Rules
no-missing-context-display-name
Full Name in eslint-plugin-react-x
react-x/no-missing-context-display-nameFull Name in @eslint-react/eslint-plugin
@eslint-react/no-missing-context-display-nameFeatures
🔧
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 adisplayNamewhich React can use as itsdisplayNamein devtools.