Skip to content

Use ServerStyleSheet on NextJs app router #426

@diegoprestes

Description

@diegoprestes

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions