polyzium
polyzium
Explore posts from servers
SSolidJS
Created by polyzium on 10/27/2023 in #support
Lazy named import?
@foolswisdom Thank you for taking your time and for the answers
26 replies
SSolidJS
Created by polyzium on 10/27/2023 in #support
Lazy named import?
Guess figured out how this works now
26 replies
SSolidJS
Created by polyzium on 10/27/2023 in #support
Lazy named import?
Can't really tell, but it seems like it'd display fallback
26 replies
SSolidJS
Created by polyzium on 10/27/2023 in #support
Lazy named import?
Another question, I have a routing system that immediately mounts the components on parent mount, and as I switch between the routes, they are not re-rendered/demounted/etc, they are just stored in memory So let's say I execute an entry function once I click on a tab, and it fetches the resource again. Will Suspense display fallback in this case, or will it display whatever WAS there while the new fetch is going?
26 replies
SSolidJS
Created by polyzium on 10/27/2023 in #support
Lazy named import?
I think I kinda understand what you were on, it's roughly the same thing as in effects since it has to "detect" the signals/stores/resources/etc used inside the function (JSX elements in this case), so I presume suspense works the same way
26 replies
SSolidJS
Created by polyzium on 10/27/2023 in #support
Lazy named import?
Does it have any advantages over using a store for mutation purposes?
26 replies
SSolidJS
Created by polyzium on 10/27/2023 in #support
Lazy named import?
This could work but again I feel like this is yet another dirty hack, as you're "adapting" async to sync instead of being true async
26 replies
SSolidJS
Created by polyzium on 10/27/2023 in #support
Lazy named import?
Uhh okay then how do I depend on async data fetching BEFORE displaying the actual component other than to do it in lazy itself? And even then the whole lazy story with named imports repeats except you take the promise out of the component
26 replies
SSolidJS
Created by polyzium on 10/27/2023 in #support
Lazy named import?
Just to clarify, without lazy loading, this does not seem to work. If imported as-is, Solid doesn't seem to recognize this as an async component rather just a Promise with a component wrapped inside it.
26 replies
SSolidJS
Created by polyzium on 10/27/2023 in #support
Lazy named import?
On a side note, whenever I am working with async JS or TS, my brain literally melts and makes me want to just give up.
26 replies