Replies: 1 comment 3 replies
-
Can you explain a bit more what you mean by this? It seems to me that this code should do what you want. It turns any |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi folks,
I am trying to use async/await with the new
Effect.task
method to load some data. Looking at the source Effect.task either supports aNever
orError
type for the second generic parameter onEffect
.Here is some code:
I think this matches the example in the comments above the
Effect.task
source. But then becauseError
doesn't conform toEquatable
my enum of actions can no longer conform toEquatable
:I guess I can make the
Follow
on my effect optional and do error handling that way but that would be less than ideal.I have got this working:
But the map swallows up my errors. I guess I can switch to an error enum rather than a struct ?
Is this the recommended?
Beta Was this translation helpful? Give feedback.
All reactions