src/canvas.js, was I missing the point?
subscribe: (fn, main) => {
state.current.subscribers.push(fn)
return () => (state.current.subscribers = state.current.subscribers.filter(s => s === fn))
},
What's wrong with it? Looks ok to me. It adds a subscriber and returns the unsub function, which removes the callback from the list, similar to how redux subscribe() does it.
if you want to remove the callback, you should use filter(s => s !== fn)
oh! my! ... 馃槃 why can i never remember that!
it's fixed, will make a patch later on, after some other changes i want to do today.