Skip to content

gatsby-plugin-create-client-paths remounts the root on every page transition #10227

@jaredpalmer

Description

@jaredpalmer

Description

gatsby-plugin-create-client-paths is remounting the root component on every single page transition for the client-only path. This means that if you have auth check in your top-level root, your authentication check will run on each new page instead of just once like it would with a normal React SPA (e.g. one built with create-react-app)

Expected result

The root component should only mount once.

Actual result

The root (with routes) is remounted on every single transition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: confirmedIssue with steps to reproduce the bug that’s been verified by at least one reviewer.type: bugAn issue or pull request relating to a bug in Gatsby

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions