Rules
no-string-refs
Full Name in eslint-plugin-react-x
Full Name in @eslint-react/eslint-plugin
Features
🔍
Presets
core
recommended
recommended-typescript
recommended-type-checked
What it does
Disallows using deprecated string refs
.
String refs are deprecated in React. Use callback refs instead.
Examples
Failing
Passing
Implementation
See Also
no-create-ref
Prevents usage ofcreateRef()
in function components.