Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/vueComponent/vue-ref

You can use the callback to get a reference like react at vue2.x
https://github.com/vueComponent/vue-ref

Last synced: 10 days ago
JSON representation

You can use the callback to get a reference like react at vue2.x

Awesome Lists containing this project

README

        

# vue-ref
You can use the callback to get a reference like react.

[![NPM version](https://img.shields.io/npm/v/vue-ref.svg?style=flat)](https://npmjs.org/package/vue-ref) [![NPM downloads](http://img.shields.io/npm/dm/vue-ref.svg?style=flat)](https://npmjs.org/package/vue-ref)

```bash
$ npm install vue-ref --save
```

```js
import ref from 'vue-ref'
Vue.use(ref)
```

```html

hello

{{ n }}
```

| Property | Description | Type |
| -------- | ----------- | ---- |
| v-ref | a callback function | function(dom \| vnode, key) |

###
In this callback function, you should not change any reactive data. Otherwise the `render` will enter an infinite loop.