Post

Trying to get the loading state right. What's your preferred way? 1️⃣ Show one spinner/skeleton until whole page is loaded 2️⃣ Use a spinner/skeleton for each component and show data as soon as available #buildinpublic

0 reposts1 like

I think the second options is much easier to implement as all you need to do is just to check the status of loading and show skeletons whereas for the first option, you actually need to recreate the whole layout. IMHO

Only if a whole page skeleton is used. I using a spinner for the whole page it's even more easier. Just wrap everything inside a Suspense component. But what's the best UX for the user?

I use spinner too but in some cases the loading skeleton is more acceptable, say for the list of items. I think anything that is showing clearly the process of loading, works well enough.