Hey, I currently use this ServerStyleSheet feature in my NextJs application using the pages router.
I'm trying to migrate now my site to use the app router, but I'm having problems to use it there. If I try to use the same approach we have in the docs it requires me to use the use client which will render the page in the browser and not in the SSR anymore. This gives a bad experience because it takes sometime until the CSS is loaded and the page has a small flick in the start.
Any ideas of how to use this feature in nextjs with app router?
Hey, I currently use this
ServerStyleSheetfeature in my NextJs application using the pages router.I'm trying to migrate now my site to use the app router, but I'm having problems to use it there. If I try to use the same approach we have in the docs it requires me to use the
use clientwhich will render the page in the browser and not in the SSR anymore. This gives a bad experience because it takes sometime until the CSS is loaded and the page has a small flick in the start.Any ideas of how to use this feature in nextjs with app router?