I have a parent component that always needs to retrieve a token first before the subcomponents get executed. As discussed in this post What is the correct order of execution of useEffect in React parent and child components? the subcomponents useEffect gets executed first.
My question is how can I handle retrieving the token on initial loading (in the main component)?