Answer the question
In order to leave comments, you need to log in
How will useEffect dependencies work?
Hello. I have the following code in the component:
When the onChangeSelect event happens, I change two dependencies specified in useEffect => params.page and paramsFilters. What dependency will work in this case useEffect. I checked through the console, it works once.
Answer the question
In order to leave comments, you need to log in
Why does he have to work twice? Two of its dependencies were changed at the same time (within one render), it worked if at least one was changed. All right.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question