https://github.com/yetone/rve
React mixed Vue 3.0 API with type safety
https://github.com/yetone/rve
hooks-api-react react vue
Last synced: 11 months ago
JSON representation
React mixed Vue 3.0 API with type safety
- Host: GitHub
- URL: https://github.com/yetone/rve
- Owner: yetone
- License: mit
- Created: 2019-07-31T14:35:16.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T08:17:42.000Z (about 3 years ago)
- Last Synced: 2025-03-16T21:05:45.688Z (12 months ago)
- Topics: hooks-api-react, react, vue
- Language: TypeScript
- Homepage:
- Size: 1.91 MB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 23
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## rve
React mixed Vue 3.0 API with type safety
[](https://nodei.co/npm/rve/)
### INSTALL
```sh
npm install rve --save
```
### USAGE
```jsx
import React from 'react'
import { value, useState, useEffect, render } from 'rve'
function App() {
const count = value(0)
const state = useState({
user: {
name: 'yetone',
},
a: {
b: {
c: {
d: 0,
}
}
}
})
const incr = () => count.value++
useEffect(() => {
document.title = `${state.user.name} clicked ${count.value} times`
})
return (
{state.user.name} clicked {state.count} times
a.b.c.d is {state.a.b.c.d}
state.user.name = e.target.value} />
state.a.b.c.d = e.target.value} />
state.a.b = {c: {d: 233}}}>Reset a.b
Click me
)
}
render(, document.getElementById('app'))
```