How do I scope to an enum and then do .ifCaseLet? #1420
-
I'm working with the protocol beta branch. I had a feature like this:
In my reducer I was able to switch between states and then use
But now I wanted to change it so that the
But I'm struggling with how to update the reducer to work with this. I tried creating a The compiler complains it cannot type-check the reducer in a reasonable time. In the old way I think I would have done a scope and then case on the Login reducer but now I'm not so sure with this. Any guidance would be appreciated. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
This is unfortunately a blind spot in the library right now. We don't provide an ergonomic tool to first scope to an enum field and then further scope to a case. There is a workaround though, which you can use until we come up with a better tool. |
Beta Was this translation helpful? Give feedback.
This is unfortunately a blind spot in the library right now. We don't provide an ergonomic tool to first scope to an enum field and then further scope to a case. There is a workaround though, which you can use until we come up with a better tool.