Open minemos opened 9 months ago
This looks like an issue between Emotion and Next - Emotion probably needs to have a style cache set.
Check this thread for some examples on this.
That can't be solution I think. (Also I tried)
I think problem is about server component and client component.
But that component (registry) also using client component.
To use full features in next js app dir, we need to use server component.
Anyway, point is server component is rendered at server but server have no css to render So client re render, and it cause layout shift
@minemos - did you find any solution for the above issue?
https://github.com/ben-rogerson/twin.macro/assets/24834933/bc12dae0-41e8-4501-addb-2476085b0169
copied from example project using app dir and next 14
package.json
src/app/GlobalStyles.js
src/app/layout.tsx
src/app/page.tsx
It caused layout shift
seems like css is load after rendering