Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/vueComponent/vue-ref
- Owner: vueComponent
- License: mit
- Created: 2018-11-15T02:36:37.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T02:51:36.000Z (11 months ago)
- Last Synced: 2024-10-31T17:12:21.633Z (16 days ago)
- Language: JavaScript
- Homepage:
- Size: 18.6 KB
- Stars: 100
- Watchers: 5
- Forks: 14
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.