Rules
is-from-ref
Reports all identifiers initialized or derived from refs in JSON format. Useful for debugging. This rule should only be used for debugging purposes; otherwise, leave it off.
Full Name in eslint-plugin-react-debug
react-debug/is-from-refFeatures
🐞
Presets
Rule Details
import React from "react";
function MyComponent() {
const myRef = React.useRef(42);
// ^^^^^
// - {"name": "myRef", "init": "React.useRef(42)"}
const value = myRef.current;
// ^^^^^
// - {"name": "value", "init": "myRef.current"}
return null;
}Resources
See Also
react-debug/class-component
Reports all class components in JSON format.react-debug/is-from-react
Reports all identifiers initialized from React in JSON format.react-debug/jsx
Reports all JSX elements and fragments in JSON format.
is-from-react
Reports all identifiers initialized from React in JSON format. Useful for debugging. This rule should only be used for debugging purposes; otherwise, leave it off.
jsx
Reports all JSX elements and fragments in JSON format. Useful for debugging. This rule should be used only for debugging purposes; otherwise leave it off.