Shared logic
Put logic you use in many places in a .js file, then use mouse = trackMouse(). It can use Kreftjs.state, Kreftjs.watch, Kreftjs.onDestroy…
logic/mouse.js
0, 0
0 moves. Move the mouse anywhere.
logic/countdown.js
10 s
Store tools
Every store gets $patch() (change several things at once), $reset() (back to the start) and $watch().
The cart has 0 items, 0 €.
- Changes show up here.