Answer the question
In order to leave comments, you need to log in
How to get access in the method to the object that I form in the render and make a check?
A question. I have an object. It is formed in the render. and in the same place I do the check
const isFormValid = values(personalDataValidationStateOnFocus).every(
state => state === null
);
I also have a form onSubmit method. And there, inside this method, you need to check if isFormValid === true, then send data
. How can I implement this? I wanted to create some other variable in the state and change it in the render (set true if isFormValid = true), but this does not work and is incorrect.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question