An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

## rve
React mixed Vue 3.0 API with type safety

[![NPM](https://nodei.co/npm/rve.png?downloads=true&downloadRank=true&stars=true)](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'))
```