I have 2 components, 1 showing a calendar with some events on it, another next to it showing the detail component of a day of the calendar when we click on it.
So, to get them to work together (saving the detail component should trigger a calendar component refresh), I lifted the state to the first common ancestor so that he can orchestrate. All works well.
I was digging a bit in the react docs and came across the suspense functionality of react.
The question here is if I just want to wrap my calendar component with a suspense to wait until the data is fetched before showing the component, how do I this with the ancestor being responsible for fetching the actual data ?
I'd like to not wrap the common ancestor in a promise because my detail component should not be suspended, only the calendar component.