Skip to content

Race Condition from beforeLoad/context when rapidly changing Search #5130

@KiwiKilian

Description

@KiwiKilian

Which project does this relate to?

Router

Describe the bug

When rapidly changing search params, the context returned from a promise becomes undefined intermittently. This bug was probably introduced through #4961. It works fine on <=1.131.14 and started breaking from >=1.131.16 onwards.

Your Example Website or App

https://stackblitz.com/edit/github-tg7crfha?file=src%2Froutes%2F__root.tsx

Steps to Reproduce the Bug or Issue

Rapidly move the slider.

Expected behavior

The context shall always be defined.

Screenshots or Videos

Version 1.131.14

14.mp4

Version 1.131.37

latest.mp4

Platform

  • Router / Start Version: ^1.131.37

Additional context

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions