Is fallback prop necessary for suspense?
I tried to simplify this example as much as I can:
The provided code will render
userData()
about 50% of the time when refreshing. The other 50% it seems to just be an empty string
My understanding is that Suspense should be used whenever you access an object from createAsync
. I can confirm the data is being fetched correctly on the server from server logs.
It seems to only repro when running on a production server (in this case, cloudflare pages) but when I run locally there is no issue with this. When I add the fallback prop to the suspense tag, it looks like it renders 100% of the time
I'm a bit new to SSR so please feel free to correct any misunderstandings I have with this.
2 Replies