reactive-box basic

node v10.24.1
version: master
endpointsharetweet
const { box, sel, expr } = require("reactive-box"); const [get, set] = box(0); const [next] = sel(() => get() + 1); const [run, stop] = expr( () => `Counter: ${get()} (next value: ${next()})`, () => console.log(run()) ); console.log(run()); set(get() + 1);
Loading…

no comments

    sign in to comment