@shymean/react-vue
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published

react-vue

兼备React和Vue的开发体验

import {reactive, createApp} from "@shymean/react-vue";

type CountProps = {
  initValue: number
}

function Count({initValue = 0}: CountProps) {
  const data = reactive({
    count: initValue
  })
  
  const onClick = () => {
    data.count++
  }

  return  () => {
    return <button onClick={onClick}>click {data.count} </button>
  }
}

function App() {
  return ()=>{
    return <Count initValue={10}/>
  }
}

createApp(<App/>).mount(document.querySelector('#root')!)

Readme

Keywords

none

Package Sidebar

Install

npm i @shymean/react-vue

Weekly Downloads

1

Version

1.0.7

License

ISC

Unpacked Size

61.9 kB

Total Files

17

Last publish

Collaborators

  • shymean