#render main data while showing immediate UI

8 messages · Page 1 of 1 (latest)

tight rivet
#

Using resolvers allows me to render the main data in the returned html, but it's blocking.

Not using resolvers allows me to immediately show something (loader UI), but the rendered html only contains the loader UI and not the main data.

Is it possible to render the main data in the returned html, while also showing something immediately (loader UI). (This is possible with next.js, I think)

burnt tide
#

Showing the loader ui in a modal on top of the real html still not populated?

ruby zinc
#

I don't understand your question. Isn't the point of the loader to show until the data is available? If it is, then why would you show the loader and the data at the same time?

tight rivet
#

This is what I meant, I'm using skeletons for my loader instead of spinner in a modal.

Currently when not using a resolver, some parts of the app is loaded immediately (header, footer component). But the rendered html would have the loader/skeleton ui instead of main data.

If I use a resolver, there would be blocking (can't show the skeletons, some components that could be immediately shown) but the rendered html would contain main data.

In the provided picture, I would like it so that I could immediately render an initial html, which contains components that could be immediately rendered (header, footer, skeleton), and after the main data has loaded, I would like the rendered html to include the main data (for better SEO), but I don't know if that's possible.

I hope that clears up my question @burnt tide @ruby zinc

burnt tide
#

Why currently the already rendered elements have no main data displayed?

ruby zinc
#

No, I still don't understand. If you're only talking about SSR, then the server can only send back one HTML page. So either it contains skeletons, or it contains actual information. It can not contain one then the other.

tight rivet
tight rivet