Duplicates
Latest version
Current behavior 😯
When using FileRoutes with Suspense like in the official example, Suspense doesn't do anything and fallback isn't being displayed.
<Router root={(props) => <Suspense fallback={<div>loading...</div>}>{props.children}</Suspense>}>
<FileRoutes />
</Router>
The current behavior on the initial page navigation (page A > page B) is this:
- user clicks link ( element or button with manual "useNavigate" handling)
- "navigate" is called
- next page's assets load
- url is updated
- new page is displayed
Notice, that fallback page is never displayed and url is only updated after next page assets fully load
Expected behavior 🤔
- user clicks link
- "navigate" is called
- url is updated (without delay) & Suspence fallback page is shown
- next page's assets load
- new page is displayed
Steps to reproduce 🕹
Stackblitz example
Steps:
- create 2 linked pages (either use component or button with manual "useNavigate") with FileRoutes
- add "fallback" parameter to top level Suspence
- add a long running resource on page B so it's easier to spot what's going on
(createResource(() => wait(5000)))
- compile, navigate from page A to page B
- observe: link clicked > nothing happens (assets load) > url & page updated
Context 🔦
I believe this is unexpected behavior and it doesn't work well with "view transition api"
Your environment 🌎
npmPackages:
"@solidjs/router": "^0.15.3",
"@solidjs/start": "^1.1.7",
"solid-js": "^1.9.9",
"vinxi": "^0.5.8"
Duplicates
Latest version
Current behavior 😯
When using FileRoutes with Suspense like in the official example, Suspense doesn't do anything and fallback isn't being displayed.
The current behavior on the initial page navigation (page A > page B) is this:
Notice, that fallback page is never displayed and url is only updated after next page assets fully load
Expected behavior 🤔
Steps to reproduce 🕹
Stackblitz example
Steps:
(createResource(() => wait(5000)))Context 🔦
I believe this is unexpected behavior and it doesn't work well with "view transition api"
Your environment 🌎
npmPackages: "@solidjs/router": "^0.15.3", "@solidjs/start": "^1.1.7", "solid-js": "^1.9.9", "vinxi": "^0.5.8"