Describe the bug
Deferring expense logs loader data does not work when navigating between expense detail pages.
To Reproduce
Steps to reproduce the behavior:
- Finish chapter 13.
- Delay (
setTimeout) the expenseLogs database query for better visibility (see p. 247).
- Use the expense overview page (expenses list) to navigate between different expense details pages.
- Notice that the navigation to the expense details page only happens after the
expenseLogs data is fetched, not deferring the expenseLogs fetch request.
Expected behavior
When navigating between expense details pages, the navigation should happen after the expense is fetched, but should not await the expenseLogs promise. Instead, it should render the expense details page and show the fallback loading indication for the expenseLogs section.
Actual behavior
The navigation only happens after the expenseLogs promise resolves, not deferring the promise.
Additional context
When navigating from any other page to an expense details page (e.g., the income routes) or when performing a full-page reload, the deferring of the loader data works as expected. The bug only occurs when navigating between detail pages.
Describe the bug
Deferring expense logs loader data does not work when navigating between expense detail pages.
To Reproduce
Steps to reproduce the behavior:
setTimeout) theexpenseLogsdatabase query for better visibility (see p. 247).expenseLogsdata is fetched, not deferring theexpenseLogsfetch request.Expected behavior
When navigating between expense details pages, the navigation should happen after the
expenseis fetched, but should not await theexpenseLogspromise. Instead, it should render the expense details page and show the fallback loading indication for theexpenseLogssection.Actual behavior
The navigation only happens after the
expenseLogspromise resolves, not deferring the promise.Additional context
When navigating from any other page to an expense details page (e.g., the income routes) or when performing a full-page reload, the deferring of the loader data works as expected. The bug only occurs when navigating between detail pages.