Answer the question
In order to leave comments, you need to log in
If a functional component receives data from the server in useEffect(), will it be a pure function?
If a functional component receives data from the server in useEffect(), will it be considered a pure function? And why?
Answer the question
In order to leave comments, you need to log in
with the same input data (props or data received via api, for example), the rendering will not differ? will not. this means that fc will be considered a pure function, therefore it can be memoized (here it is worth mentioning that if the state is redefined in the component, then react will not pay attention to the memo wrapper and will still re-render)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question