Effect CommunityEC
Effect Communityβ€’2y agoβ€’
10 replies
arazorda

Question on Short-Circuiting with validatePassword Effect in Tap

Hi guys, will this work as I'm expecting it to work? Near the last step, im using validatePassword, which is also an Effect (Effect<true, string, never>), if it fails, it returns a string, otherwise it's just true, So in this case, I don't really care about the "true", I just want it to short-circuit if there's a fail. Is using tap correct here? Will tap short circuit if validatePassword fails or do I need to use something else?
Screenshot_2024-04-01_at_9.09.07_PM.png
Was this page helpful?