DEV Community

Discussion on: Next.js + MUI v5 + Typescript tutorial and starter

Collapse
 
ajjack50n profile image
ajjack50n

hey, this is a great post thank you!

I have a question, though, when I follow those steps, I find my pages jump. It seems styles are not applied until about a second after load - depending on complexity of page. Does anyone else see this?

Collapse
 
adamsiekierski profile image
Adam Siekierski

I have that issue. Did you manage to resolve it?

Collapse
 
hpouyanmehr profile image
Hosein Pouyanmehr

Hi,
This is actually related to Next.js, and checking this issue may be useful.

Collapse
 
hpouyanmehr profile image
Hosein Pouyanmehr

Hi,
You're welcome. I am glad if it was helpful.

Sorry for the delay. There isn't a lot of free time for me right now.
Currently, MUI isn't fully compatible with React version 18, and I think your issue is about that. So, if you're using that version of react and react-dom, downgrading it to version 17 will solve it.

If you don't use v18, providing a sandbox may help to find out the problem.

Collapse
 
hpouyanmehr profile image
Hosein Pouyanmehr

Hi again,
As an update to my previous answer, this wasn't an MUI issue. You can read in this issue about that. The problem is from Next.js (Check the issue from here), and it'll be fixed in 12.1.7.

Collapse
 
ajjack50n profile image
ajjack50n

Thank you… appreciate this update as at 12.1.6 the issue still persists. I had heard that it didn’t show in the latest builds but waiting for the stable release.