Skip to content

Commit

Permalink
easy: add link to legacy context warning (#30315)
Browse files Browse the repository at this point in the history
Missed this when adding the link to other places of the same warning in
378b305
  • Loading branch information
kassens authored Jul 11, 2024
1 parent 6587fe1 commit 8e00cf0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/react-server/src/ReactFizzServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1696,13 +1696,15 @@ function renderFunctionComponent(
if (disableLegacyContext) {
console.error(
'%s uses the legacy contextTypes API which was removed in React 19. ' +
'Use React.createContext() with React.useContext() instead.',
'Use React.createContext() with React.useContext() instead. ' +
'(https://react.dev/link/legacy-context)',
componentName,
);
} else {
console.error(
'%s uses the legacy contextTypes API which will be removed soon. ' +
'Use React.createContext() with React.useContext() instead.',
'Use React.createContext() with React.useContext() instead. ' +
'(https://react.dev/link/legacy-context)',
componentName,
);
}
Expand Down

0 comments on commit 8e00cf0

Please sign in to comment.