3 ms·
Yeah. We need to ensure that we have a handler to catch the effect (there is an issue about that: https://github.com/macabeus/js-proposal-algebraic-effects/issu
by macabeus 7y ago
Yeah. We need to ensure that we have a handler to catch the effect (there is an issue about that: https://github.com/macabeus/js-proposal-algebraic-effects/issues/8 https://github.com/macabeus/js-proposal-algebraic-effects/is...)
For user, it could be useful to separate what from the how.
For example, we could have a function that launches effects to manipulate the file system, and for test/mock purpose we could catch this effects with handlers that mock the file system.
I know that the pattern dependency injection solve the same problem, but with effects you could do it with a more natural code.