grobitto
grobitto
SSolidJS
Created by grobitto on 4/9/2025 in #support
Possible bug? Solidjs lazy() caches network errors
We are developing a smart tv app and as a part of checklist process there is a requirement that app should correctly handle network outages. The problem I discovered is that solid's lazy function caches TypeError: Failed to fetch dynamically imported module. I was not able to recover from this error in any way other than restart app completely - errorboundary reset not working. Steps to reproduce: switch network to offline try to load any route that uses lazy (error expected). switch network back to online lazy component error is cached and not refetched Do you think it's and error, should I report a bug? Is there any way to handle error by myself and return something that will be re-evaluated next time?
11 replies
SSolidJS
Created by grobitto on 4/1/2025 in #support
How to detect if I got to the Route with back button or navigate(-1)
Struggling with this one. I know I can probably use 'popstate' event but is there any solid-router approach?
5 replies
SSolidJS
Created by grobitto on 1/31/2025 in #support
Solid Router: save page state inside useBeforeLeave
Hello everyone I have a case when I want to save some of the page state inside history to be able to access it if user goes back at some point. I see useLocation router primitive, but the .state there is something passed frim useNavigate. In my case I want to save this state inside useBeforeLeave. I know I can just use history.replaceState browser API, but the problem is I need to use either standard Router, or MemoryRouter, depending on platform the app is running at, so I would love to stick to solid-only api
1 replies