Answer the question
In order to leave comments, you need to log in
Why can't you pass parameters to callBack useeffect?
On the review code, I was told that the arguments to the callback function passed to useeffect cannot be passed. You need to do it outside of the hook. Why?
Answer the question
In order to leave comments, you need to log in
Let's break down the useEffect hook
useeffect(() => {
action(object) // собственно вызов этих методов
}, [action, object]) // объекты и методы, которые вы используете внутри коллбэка
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question