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
{{ message }}
This repository has been archived by the owner on Oct 3, 2021. It is now read-only.
Hi, I implemented step validator returning a hook state. But when the function is called, triggered by the "next" button, the state used in the validator is an old one, corresponding to the state during Its declaration in useEffect rule.
It seems the validation implementation doesn't support the changes state related to a hook, and only allows Its scope logic.
Do you know how I can use validator to return a boolean depending of state ? For instance return a variable passed by child component.
Thanks for help and don't hesitate if you need some payloads.
The text was updated successfully, but these errors were encountered:
Fixessaini-g#19
We no longer use useReducer as it would create a closure around the state in the validator and hence it would not be updated. Instead we use contexts and a hook useProgressStep which never puts the validator function into state
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi, I implemented step validator returning a hook state. But when the function is called, triggered by the "next" button, the state used in the validator is an old one, corresponding to the state during Its declaration in useEffect rule.
It seems the validation implementation doesn't support the changes state related to a hook, and only allows Its scope logic.
Do you know how I can use validator to return a boolean depending of state ? For instance return a variable passed by child component.
Thanks for help and don't hesitate if you need some payloads.
The text was updated successfully, but these errors were encountered: