Skip to content
This repository was archived by the owner on Oct 3, 2021. It is now read-only.
This repository was archived by the owner on Oct 3, 2021. It is now read-only.

Validator and state in React. #19

Open
@charlo-chopin

Description

@charlo-chopin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions