I have 3 react components, component 1 is the parent of component 2 and 3.
I am using react and Apollo client and hooks
Requirement : Component 1 needs to make a ajax call, and if it returns false, I will have to render component 2 which is basically to display error scenario.
If component 1's ajax call returns true, then I have to show component 3, which will make its own graph ql ajax call to display results.
What is the most efficient way to design the component structure ??