【文件属性】:
文件名称:vue-to-react:将Vue组件变成React组件
文件大小:149KB
文件格式:ZIP
更新时间:2021-05-06 16:14:02
JavaScript
即时React
安装
yarn add @egoist/vue-to-react
用法
import React from 'react'
import { render } from 'react-dom'
import toReact from '@egoist/vue-to-react'
const VueComponent = {
data ( ) {
return {
count : 0
}
} ,
render ( h ) {
return h (
'button' ,
{
on : {
click : ( ) => this . count ++
}
} ,
[ this . count ]
)
}
}
const R
【文件预览】:
vue-to-react-master
----package.json(1KB)
----.prettierrc(69B)
----LICENSE(1KB)
----src()
--------index.js(543B)
----.gitignore(34B)
----circle.yml(642B)
----demo()
--------index.js(408B)
----README.md(2KB)
----yarn.lock(378KB)
----.editorconfig(187B)
----.gitattributes(12B)