I have a react app with parent component app.js and a child component homepage.js.
So when I refresh the page useEffect hook from homepage.js runs first and then app.js useEffect runs but I have some functionality that is dependent on app.js useEffect I want that code run automatically after page refresh and after the useEffect in app.js.
if you want to execute parent component code first then in parent instead of using useEffect() execute that code in useMemo()