Rules
no-string-refs
Full Name in eslint-plugin-react-x
Full Name in @eslint-react/eslint-plugin
Features
🔄
Presets
x
recommended
recommended-typescript
recommended-type-checked
Description
Replaces string refs with callback refs.
String refs are deprecated in React. Use callback refs instead.
Examples
Before
After
Implementation
See Also
no-create-ref
Prevents usage ofcreateRef()
in function components.