You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ah this is actually the same root cause as #10194 and was fixed by #10201. That's available in 6.10.0-pre.2 currently and should be out in a stable 6.10.0 shortly.
As a note, it's only an issue for lazy routes on initial load. They do run in parallel on subsequent client-side navigations.
What version of React Router are you using?
6.9.0
Steps to Reproduce
Crate a route with lazy and loader definition.
Add delays and console logs to both lazy and loader definitions in order to inspect running order.
Example codesandbox
Expected Behavior
Loader function should run in parallel with lazy according to the docs:
https://reactrouter.com/en/main/route/lazy#statically-defined-properties
According to the example codesandbox, running order should be (visible on console):
-Lazy import begin
-loader begin
-loader end
-Lazy import end
Actual Behavior
Loader function starts after lazy function finishes. Running order is:
-Lazy import begin
-Lazy import end
-loader begin
-loader end
The text was updated successfully, but these errors were encountered: