This may sound strange, but I am trying to make a repository that will work both on b-end and f-end. On the f-end I want to use zustand as an implementation.
But this does not make a lot of sense for these reasons: 1) If Effect fails, I won't receive a stream. 2) I still have to consume the last value of a stream and deal somehow with Option.
I thought about encoding an error in the stream itself: Stream<never, ProductNotFound, Product>> but I will still have those issues
I have a rough guess that what I want is achievable with fibers, but these are unknown field to me and maybe someone can point me to good material about them or propose me a better abstraction