Skip to content

React.Strict mode forces the getData to run twice #194

@vongohren

Description

@vongohren

I just did a create react app and recieves the react strict mode <React.StrictMode> around my App.
If i just add a simple route that uses getData, or anything withData like that, it ends up running that data function twice.
I removed all context and everything but the sinner was <React.StrictMode>

So I guess it is reproducible by just running CRA cli and adding navi to the mix, one with a route that wants to get data

Sorry for not being able to make on right now, just running out of time here, but wanted to leave this breadcrumb of information

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