Skip to content

Use PureComponents or memo for react-router-dom #7248

Closed
@theboolean

Description

@theboolean

Version

5.1.2

This is a feature request.

This issue is a copycat of #6434, since it was closed because the ecosystem was not ready to lose support for legacy context API. More than 1 year passed since then, and IMHO since v6 is out in alpha and it already contains breaking changes, we can go one step further and take the decision of optimizing react-router-dom components for the final v6, mentioning in the migration guide to upgrade to new context API.

In my case for example I have a list component that receives an array of items and I can't avoid that when one single item changes, all the Links in other items re-renders, creating a big performance hit in the application.

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