live-model
v0.4.6
Published
Live Model is a library to sync data between client and server.
Readme
Live Model
Live Model is a library to sync data between client and server.
This is currently a playground to explore developer interfaces
Installation
npm i live-modelUsage
Here's how you can use Live Model with React:
import { useLiveState } from 'live-model';
function Counter() {
const { value, setValue } = useLiveState('key', 0);
return (<div>
<p>Count: {value}</p>
<button onClick={() => setValue(value + 1)}>Increment</button>
</div>);
}If you need to support other frameworks, please create a GitHub issue.
