Skip to content

[eslint-config-react-app]: consider configuring react/no-unstable-nested-components rule? #10729

Description

@karlhorky

Is your proposal related to a problem?

Components nested inside components without memoization leads to unstable components (the nested component and all its children are recreated during each re-render). eslint-config-react-app could warn or error upon seeing this pattern.

Describe the solution you'd like

eslint-config-react-app could configure the new react/no-unstable-nested-components rule that will be released in eslint-plugin-react@7.23.0 (see pull request and changelog)

Describe alternatives you've considered

Do not lint for this problem

Additional context

Related Pull Request: jsx-eslint/eslint-plugin-react#2750

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions