Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

realar/readme/first

node v14.20.1
version: master
endpointsharetweet
const { value } = require('realar'); const store = value(0) const add = store.updater((state, num) => state + num) const inc = store.updater(state => state + 1) // Subscribe to store updates store.to(state => console.log(`state ${state}`)); inc(); // in console: state 1 add(4); // in console: state 5
Loading…

no comments

    sign in to comment