Skip to content

Commit

Permalink
Enable react/no-unstable-nested-components rule
Browse files Browse the repository at this point in the history
Summary:
Dynamic nested components can cause tricky performance issues in React, as the reconciler will not be able to reuse the previously mounted component tree.

Changelog: [General] [Added] Added linter warning config for unstable nested components

Reviewed By: motiz88

Differential Revision: D33767283

fbshipit-source-id: 869ece99dc63cc3a150bae882d26df8541e8db59
  • Loading branch information
javache authored and facebook-github-bot committed Jan 26, 2022
1 parent 3d1d4ee commit 988fefc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/eslint-config-react-native-community/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,15 +300,16 @@ module.exports = {
'react/no-multi-comp': 0,
'react/no-string-refs': 1,
'react/no-unknown-property': 0,
'react/no-unstable-nested-components': 1,
'react/prop-types': 0,
'react/react-in-jsx-scope': 1,
'react/self-closing-comp': 1,
'react/wrap-multilines': 0,

// React-Hooks Plugin
// The following rules are made available via `eslint-plugin-react-hooks`
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'error',
'react-hooks/rules-of-hooks': 2,
'react-hooks/exhaustive-deps': 2,

// React-Native Plugin
// The following rules are made available via `eslint-plugin-react-native`
Expand Down

0 comments on commit 988fefc

Please sign in to comment.