Skip to content

Deferring expense logs loader data not working when navigating expense detail pages. #129

@andrelandgraf

Description

@andrelandgraf

Describe the bug

Deferring expense logs loader data does not work when navigating between expense detail pages.

To Reproduce

Steps to reproduce the behavior:

  1. Finish chapter 13.
  2. Delay (setTimeout) the expenseLogs database query for better visibility (see p. 247).
  3. Use the expense overview page (expenses list) to navigate between different expense details pages.
  4. 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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingwith solutionTag for bug tickets that document the solution

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions