Rules
no-missing-context-display-name
Full Name in eslint-plugin-react-x
react-x/no-missing-context-display-name
Full Name in @eslint-react/eslint-plugin
@eslint-react/no-missing-context-display-name
Description
Enforces that all contexts have a displayName
which can be used in devtools.
Examples
Failing
import React from "react";
const MyContext = React.createContext();
Passing
import React from "react";
const MyContext = React.createContext();
MyContext.displayName = "MyContext";
Implementation
See Also
no-missing-component-display-name
Enforces that all components have adisplayName
which React can use as itsdisplayName
in devtools.