You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/plugins/eslint-plugin-react-x/src/rules/no-unstable-context-value.md
+2
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,8 @@ Prevents non-stable values (i.e. object literals) from being used as a value for
31
31
32
32
React will re-render all consumers of a context whenever the context value changes, and if the value is not stable, this can lead to unnecessary re-renders.
33
33
34
+
In React 19 and later, the [`Context` component can be used via `<Context>` instead of `<Context.Provider>`](https://react.dev/blog/2024/12/05/react-19#context-as-a-provider), so it is recommended to use the [`context-name`](./naming-convention-context-name) rule to avoid false negatives.
0 commit comments