Skip to content
Turn a React component into a Vue component.
JavaScript
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
demo feat: rename the project Jul 6, 2019
src feat: init Jul 6, 2019
.editorconfig feat: init Jul 6, 2019
.gitattributes feat: init Jul 6, 2019
.gitignore feat: init Jul 6, 2019
.prettierrc feat: init Jul 6, 2019
LICENSE feat: init Jul 6, 2019
README.md fix(readme): update installation guide Jul 6, 2019
circle.yml feat: init Jul 6, 2019
package.json feat: rename the project Jul 6, 2019
yarn.lock feat: init Jul 6, 2019

README.md

react-to-vue

NPM version NPM downloads CircleCI donate chat

Install

yarn add @egoist/react-to-vue

Usage

import Vue 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)

new Vue({
  el: '#app',
  render: h => h(VueComponent)
})

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

You can’t perform that action at this time.