Skip to content

Use relative links, without domain, in reference docs - #8712

Open
ShakilUrRehman21 wants to merge 1 commit into
reactjs:mainfrom
ShakilUrRehman21:fix-relative-doc-links
Open

ShakilUrRehman21 wants to merge 1 commit into
reactjs:mainfrom
ShakilUrRehman21:fix-relative-doc-links

Conversation

@ShakilUrRehman21

Copy link
Copy Markdown

Summary

Following the precedent in #8678, this PR replaces hardcoded https://react.dev domain links with relative paths in reference documentation:

  • src/content/reference/react-dom/client/createRoot.md: change https://react.dev/reference/react-dom/flushSync to /reference/react-dom/flushSync
  • src/content/reference/eslint-plugin-react-hooks/lints/set-state-in-render.md: change https://react.dev/reference/react/useState#storing-information-from-previous-renders to /reference/react/useState#storing-information-from-previous-renders

Why

Hardcoded https://react.dev domains break localization: when users reading translated documentation forks (e.g. es.react.dev, fr.react.dev, ja.react.dev, zh-hans.react.dev) click these links, they are redirected out of their language back to the English site. Using relative paths preserves language selection across localized forks.

@github-actions

Copy link
Copy Markdown

Size changes

Details

📦 Next.js Bundle Analysis for react-dev

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

This branch was successfully deployed

1 active deployment
Preview — c76e41b7 Deployed Oct 27, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant