Hide messy rendered page until DomContentLoaded

146 Views Asked by At

My website is showing messy components until DomContentLoaded. I would like to show a loading-spinner or hide the content until page is loaded. I'm using React SSR with UmiJS3. page loading progress as seen by Google

1

There are 1 best solutions below

0
On

I would suggest you to use Suspense API from React but it doesn't support ssr right now but they recommend Loadable components which referenced in here