What is the correct order of execution of useEffect in React parent and child components?
问题 For example, if I have components A and B, and component B is the child of component A: <A> <B /> </A> Inside A we have: useEffect(() => { console.log('Parent A useEffect') }) Inside B we have: useEffect(() => { console.log('Child B useEffect') }) I did some tests and I saw 2 things: At the first load (after F5, for example), the log result is: Parent A useEffect Child B useEffect If we go to another component and then come back to component B (not by reloading but by using react-router, for