raveclassic / frp-ts

Functional reactive values-over-time
MIT License
80 stars 8 forks source link

Fix infinite loop when the action was called during notifying by another action #80

Closed prodderman closed 7 months ago

prodderman commented 9 months ago

@raveclassic Hi

Infinite loop bugfix when I call action during notifying under another action

const a = newAtom(0)
const cb = () => action(() => {})
a.subscribe({ next: cb })
action(() => a.set(1))
raveclassic commented 9 months ago

Hi @prodderman, thanks for the fix!

Please, fix the commit message though

prodderman commented 8 months ago

@raveclassic check it again pls

bukhtiyarov-a-v commented 7 months ago

Thx guys!