2.0.0 • Published 3 years ago

@egoist/react-to-vue v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

react-to-vue

NPM version NPM downloads

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

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. 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

2.0.0

3 years ago

1.1.1

5 years ago

1.1.0

5 years ago