DEV Community

loading...

Discussion on: PureScript: UI driven by Finite State Machines and Event Streams

Collapse
shamansir profile image
Ulric Wilfred Author

I hope a late reply still counts.

Effect model in contrast to Effect (List action) is completely hiding the things one does with the model during the Effect process, so it is much harder to tell and debug what happened there. So yes, it will help in testing as well. When the list of actions to perform is returned and the update is granular or atomic, so any action makes only a subtle indivisible change to a model, then anything what happened is trackable.

This concept was also praised in Redux and with the useEffect in React — it is easier to track actions if they are as minimal, indivisible and descriptive as possible.

Plus, it gives you the way to rollback the effects one by one and implement the Redo/Undo in just few easy steps.

Thread Thread
dimsuz profile image
dimsuz

Thank you!

Forem Open with the Forem app