Turn a React component into a Vue component.
MIT License
npm i @egoist/react-to-vue
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')
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
@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