SolidJSS
SolidJSโ€ข10mo agoโ€ข
10 replies
grobitto

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?
Was this page helpful?