I have a big layout.ts file in my app. Is there a way to load the page first and delay providers?
Unanswered
ascee posted this in #help-forum
asceeOP
My layout.tsx t has a lot of scripts, and delays the loading of my page by a significiant amount (800ms+!) and it's literally just stuff like PostHog, etc - I use React Query and have no contexts around my app. I am not sure if server-rendering can help me a ton in this case. I was wondering what's a hack I could use to delay loading the wrappers inside of layout.tsx? Literally make the page dysfunctional just to show stuff, disable some interactions on the page until the providers load. It sounds exactly SSR but like... every single component on my page requires SSR, it controls an open/close state, relies on a ton of states and runs effects - not entirely sure how can I implement SSR