Interview Frontend Phone Interview Intuit

Just finished the intuition phone interview with a nice person from India. We discussed past projects for the first half-hour, delving deep into them. In the second half-hour, we worked on a small problem.

The problem was within a Page component containing many independent small Widget components. The requirement was that when any Widget component makes a network call, the Page component should only display one loading spinner.

Seeking advice.

You can maintain global state in the Page Component and pass the state change method in the child component. If component hierarchy is deep, use context to pass the loading state setter.