From 652b8cc4dd35924437a5f58f3df7ca92231693ad Mon Sep 17 00:00:00 2001 From: MorikawaSouma Date: Thu, 19 Mar 2026 10:04:56 +0800 Subject: [PATCH 1/2] fix(devtools): update profiling links to react.dev MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The profiling documentation links in DevTools were pointing to the legacy reactjs.org domain via fb.me short URLs. Updated all references to point to the current react.dev documentation. Fixes #31878 Changed: - ProfilingNotSupported.js: fb.me/react-devtools-profiling → react.dev/reference/profiler - NoProfilingData.js: fb.me/react-devtools-profiling → react.dev/reference/profiler - TimelineNotSupported.js: fb.me/react-devtools-profiling → react.dev/reference/profiler The old reactjs.org/link/profiling URL redirects to an outdated site that displays a banner stating it's no longer updated. --- .../src/devtools/views/Profiler/NoProfilingData.js | 2 +- .../src/devtools/views/Profiler/ProfilingNotSupported.js | 4 ++-- packages/react-devtools-timeline/src/TimelineNotSupported.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/react-devtools-shared/src/devtools/views/Profiler/NoProfilingData.js b/packages/react-devtools-shared/src/devtools/views/Profiler/NoProfilingData.js index 5e6c39b28ce3..21abe88af3c1 100644 --- a/packages/react-devtools-shared/src/devtools/views/Profiler/NoProfilingData.js +++ b/packages/react-devtools-shared/src/devtools/views/Profiler/NoProfilingData.js @@ -23,7 +23,7 @@ export default function NoProfilingData(): React.Node { Click{' '} here diff --git a/packages/react-devtools-shared/src/devtools/views/Profiler/ProfilingNotSupported.js b/packages/react-devtools-shared/src/devtools/views/Profiler/ProfilingNotSupported.js index 8799a29d02fb..55aa72789b7e 100644 --- a/packages/react-devtools-shared/src/devtools/views/Profiler/ProfilingNotSupported.js +++ b/packages/react-devtools-shared/src/devtools/views/Profiler/ProfilingNotSupported.js @@ -23,10 +23,10 @@ export default function ProfilingNotSupported(): React.Node { Learn more at{' '} - reactjs.org/link/profiling + react.dev/reference/profiler .

diff --git a/packages/react-devtools-timeline/src/TimelineNotSupported.js b/packages/react-devtools-timeline/src/TimelineNotSupported.js index 7eac79da94f5..8b781ed51561 100644 --- a/packages/react-devtools-timeline/src/TimelineNotSupported.js +++ b/packages/react-devtools-timeline/src/TimelineNotSupported.js @@ -58,7 +58,7 @@ function UnknownUnsupportedReason() { Click{' '} here From 32c410f8a83c35839b14efd26380d6018f29d57e Mon Sep 17 00:00:00 2001 From: MorikawaSouma Date: Thu, 19 Mar 2026 10:07:17 +0800 Subject: [PATCH 2/2] docs(eslint-plugin-react-hooks): warn about regex matching in additionalHooks The additionalHooks option uses regex matching which can catch more than intended. The example regex '(useMyCustomHook|useMyOtherCustomHook)' would match 'useMyCustomHook2' and 'useMyOtherCustomHookTest' which may not be the desired behavior. Added a warning and example with word boundaries to help users avoid this pitfall. Fixes #29045 This issue was reported when WordPress Gutenberg used the same regex pattern and encountered unintended matches. --- packages/eslint-plugin-react-hooks/README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/eslint-plugin-react-hooks/README.md b/packages/eslint-plugin-react-hooks/README.md index a1b4bcabb59f..b13d09337e7e 100644 --- a/packages/eslint-plugin-react-hooks/README.md +++ b/packages/eslint-plugin-react-hooks/README.md @@ -141,6 +141,19 @@ This option accepts a regex to match the names of custom Hooks that have depende } ``` +**Warning**: The regex matches the hook name anywhere in the identifier. To avoid unintended matches (e.g., `useMyCustomHook2`), use word boundaries: + +```js +{ + rules: { + // ... + "react-hooks/exhaustive-deps": ["warn", { + additionalHooks: "\\b(useMyCustomHook|useMyOtherCustomHook)\\b" + }] + } +} +``` + We suggest to use this option **very sparingly, if at all**. Generally saying, we recommend most custom Hooks to not use the dependencies argument, and instead provide a higher-level API that is more focused around a specific use case. ## Valid and Invalid Examples