yarn add react2vue
import Vue from 'vue'
import React from 'react'
import react2vue from 'react2vue'
const ReactComponent = () => {
const [count, setCount] = React.useState(0)
return <button onClick={() => setCount(count + 1)}>{count}</button>
}
const VueComponent = react2vue(ReactComponent)
new Vue({
el: '#app',
render: h => h(VueComponent)
})
- 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
react2vue © EGOIST, Released under the MIT License.
Authored and maintained by EGOIST with help from contributors (list).
github.com/egoist · GitHub @EGOIST · Twitter @_egoistlily