Rules
hook
Reports all React Hooks in JSON format. Useful for debugging. This rule should be used only for debugging purposes; otherwise, leave it off.
Full Name in eslint-plugin-react-debug
react-debug/hookFeatures
🐞
Presets
Rule Details
import React, { useState } from "react";
function useToggle() {
const [value, setValue] = useState(false);
return [value, () => setValue((x) => !x)] as const;
}Resources
See Also
react-debug/class-component
Reports all class components in JSON format.react-debug/function-component
Reports all function components in JSON format in JSON format.
function-component
Reports all function components in JSON format. Useful for debugging. This rule should only be used for debugging purposes; otherwise leave it off.
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.