Confusion with suspense and nested routeData
I have two pages relying on the same data, so I put them in routes Moreover, while Page2 shows the resource stuck on loading on initial page load, the Finally, if I load Page2, then navigate to the working Page1, then navigate back, everything is loaded.
There seems to be something I'm not getting about routeData, suspense, and resources. Can anybody help me out?
app/page1
and app/page2
. My goal is to have route data for the app
route forwarded to the two pages. The idea is to have a routes/app.tsx
that looks something like this:
Then, in each of app/page1.tsx
and app/page2.tsx
,
I'm having a couple issues. First of all, in order to get anything to load, I needed to shove the following hack into app.tsx
:
Secondly, while Page1 works on initial page load, Page2 does not, and I struggle to find a difference in the data loading between them. <Suspense>
isn't rendering the fallback.0 Replies