Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add /link redirects #6670

Merged
merged 2 commits into from
Mar 1, 2024
Merged

Conversation

rickhanlonii
Copy link
Member

Adds /link redirects so the reactjs.org URLs in warning messages can be changed to react.dev.

Copy link

vercel bot commented Mar 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
react-dev ✅ Ready (Inspect) Visit Preview Mar 1, 2024 7:36pm

Copy link

github-actions bot commented Mar 1, 2024

Size changes

📦 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! 🙌

Copy link
Collaborator

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clicked through all the links printed by cat vercel.json | jq -r '.redirects[] | "source: " + .source + ", destination: " + (if .destination | startswith("https") then .destination else "https://react.dev" + .destination end)'

/link/event-pooling -> /reference/react/useEffect#fetching-data-with-effects seems off. The rest looks good.

vercel.json Outdated
},
{
"source": "/link/event-pooling",
"destination": "/reference/react/useEffect#fetching-data-with-effects",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems off since we link it from

"This synthetic event is reused for performance reasons. If you're seeing this, " +
          "you're %s `%s` on a released/nullified synthetic event. %s. " +
          'If you must keep the original synthetic event around, use event.persist(). ' +
          'See https://react.dev/link/event-pooling for more information.',

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch, this must be an existing mistake from here: https://github.com/reactjs/legacy.reactjs.org/blob/main/vercel.json#L266

I'll update to the old event pooling docs

@rickhanlonii rickhanlonii merged commit 6310c8a into reactjs:main Mar 1, 2024
4 checks passed
@rickhanlonii rickhanlonii deleted the rh/link-redirects branch March 1, 2024 19:38
rickhanlonii added a commit to facebook/react that referenced this pull request Mar 3, 2024
github-actions bot pushed a commit to facebook/react that referenced this pull request Mar 3, 2024
EdisonVan pushed a commit to EdisonVan/react that referenced this pull request Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants