RunKit + npm: effector

node v11.15.0
endpointsharetweet
const { createStore, createEvent } = require('effector') const change = createEvent('change') const first = createStore(0) .on(change, (state, value) => state + value) const second = createStore(100) .watch(first, (secondState, firstState) => console.log(secondState * firstState)) // Change first store and trigger watch in second change(20)
Created from: https://npm.runkit.com/effector
Loading…