Skip to content

Commit 988fefc

Browse files
javachefacebook-github-bot
authored andcommitted
Enable react/no-unstable-nested-components rule
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
1 parent 3d1d4ee commit 988fefc

File tree

1 file changed

+3
-2
lines changed
  • packages/eslint-config-react-native-community

1 file changed

+3
-2
lines changed

packages/eslint-config-react-native-community/index.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -300,15 +300,16 @@ module.exports = {
300300
'react/no-multi-comp': 0,
301301
'react/no-string-refs': 1,
302302
'react/no-unknown-property': 0,
303+
'react/no-unstable-nested-components': 1,
303304
'react/prop-types': 0,
304305
'react/react-in-jsx-scope': 1,
305306
'react/self-closing-comp': 1,
306307
'react/wrap-multilines': 0,
307308

308309
// React-Hooks Plugin
309310
// The following rules are made available via `eslint-plugin-react-hooks`
310-
'react-hooks/rules-of-hooks': 'error',
311-
'react-hooks/exhaustive-deps': 'error',
311+
'react-hooks/rules-of-hooks': 2,
312+
'react-hooks/exhaustive-deps': 2,
312313

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

0 commit comments

Comments
 (0)