createAsyncResource and <Suspense>
I would expect this to first render
Todos
Loading...
for 2 seconds and then all the todos in a list instead of the Loading
However when I open the page, the browser loading indicator is there for 2 seconds and then just the "end result" gets rendered in the browser.
What am I doing wrong?
Quite new to solid so please excuse if this question is dumb haha
Thanks for help!
5 Replies
deferStream: true
is telling the server to hold the response until that async op has settled. Try removing it and see what happens.Lmao, that works, my bad, thought defer stream would do the opposite, read another thread wrong then. Thanks a lot!
Just note that once the response starts streaming it's too late to modify cookies if you need to.
good to know, seems reasonable tho
is there a way to tell it when to start streaming?
or is it always instantly
I only know of
deferStream
as a means for influencing that. That doesn't mean there isn't another way though.