dillon1000/react

Commit

[lint] treat React.use() the same as use() (#27769)

We should probably treat `React.use()` the same as `use()` to allow it
within loops and conditionals.

Ideally this would implement a test that `React` is imported or required
from `'react'`, but we don't otherwise implement such a test.
Browse files
Changed paths2 files
First-parent comparison
M packages/eslint-plugin-react-hooks/__tests__/ESLintRulesOfHooks-test.js ModifiedM packages/eslint-plugin-react-hooks/src/RulesOfHooks.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…