SolidJSS
SolidJS11mo ago
2 replies
snorbi

Handling loading state

What is the correct way to implement a component that depends on state loaded asynchronously?
The component function is executed only once, so I guess that I have to create all effects and memos during that single execution.
My problem is that because the used data may still be loading, my code is full of null-checks.
It is a top-level component (like a bookmarkable page of an SPA), so I cannot "hoist up" its state.
Thanks.
Was this page helpful?