RunKit + npm: effector

node v11.15.0
endpointsharetweet
const { createStore, createEvent } = require("effector") const foo = createEvent('foo') const bar = createEvent('bar') const store = createStore(0) .on(bar, (state, value) => value) .watch(foo, (value) => console.log(`triggered ${value}`)) foo(1) bar(2) foo(3)
Created from: https://npm.runkit.com/effector
Loading…