You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The submitPassowrdFx should be called once submitPasswordEvent is fired, but only when AuthFlowState is in the right state
Then we need to collect username from AuthFlowState and password from submitPasswordEvent params in order to call a submitPassowrdFx effect.
The code snipper above won't compile, due to types mismatch, because we also need to pass password from clock. If we would have a mapping function (like fn in sample), which would be called after filtering, we could easily shape a params expected by target effect
Workaround
We can achieve desired behaviour by combining sample with guard as follows:
The reason why fn is still missing in guard is purely technical - it is quite difficult to write types for guard, so we have not yet succeeded in implementing this feature
Activity
doasync commentedon Sep 6, 2021
https://share.effector.dev/xltBEcdq
zerobias commentedon Sep 6, 2021
The reason why
fnis still missing inguardis purely technical - it is quite difficult to write types forguard, so we have not yet succeeded in implementing this featurezerobias commentedon Nov 24, 2021
guard will be merged with the sample in the next minor release. right now I am working on types for this feature
[-]Mapping function in guard method[/-][+]Merge guard and sample methods[/+]