-
Notifications
You must be signed in to change notification settings - Fork 27.2k
Closed
Labels
area: coreIssues related to the framework runtimeIssues related to the framework runtimebugcore: reactivityWork related to fine-grained reactivity in the core frameworkWork related to fine-grained reactivity in the core framework
Milestone
Description
resource() has a race condition where a request change during the loader phase that happens at the right time will be dropped, causing the resource to display stale data. This seems to happen if:
- While the resource is loading, the request changes
- Before the
effect()can run, thePromisefor the previous load resolves, which sets the resource out of loading state. - The
effectruns for the new request, but the resource is no longer a valid loading state per this check.
The condition in (3) is really trying to guard that the resource hasn't been set into Local state after the request changed. The check here is probably unnecessarily strict, but also, we should have a more robust way of detecting this condition.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: coreIssues related to the framework runtimeIssues related to the framework runtimebugcore: reactivityWork related to fine-grained reactivity in the core frameworkWork related to fine-grained reactivity in the core framework