react-to-vue
Install
npm i @egoist/react-to-vue
Usage
import { createApp, h } from 'vue'
import React from 'react'
import toVue from '@egoist/react-to-vue'
const ReactComponent = () => {
const [count, setCount] = React.useState(0)
return <button onClick={() => setCount(count + 1)}>{count}</button>
}
const VueComponent = toVue(ReactComponent)
createApp({
render: () => h(VueComponent),
}).mount('#app')
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
Author
@egoist/react-to-vue © EGOIST, Released under the MIT License.
Authored and maintained by EGOIST with help from contributors (list).
github.com/egoist · GitHub @EGOIST · Twitter @_egoistlily