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

[Bug]: React 16 docs redirect to React 17 with no explanation #7151

Open
jonrajavuori-academia opened this issue Sep 9, 2024 · 1 comment

Comments

@jonrajavuori-academia
Copy link

Summary

The 'Previous versions' page does not mention that the React 16 docs don't exist because the React 17 docs covers it, nor do the React 17 docs themselves. This is confusing and doesn't leave any way to understand more about the seemingly broken flow.

Page

https://react.dev/versions

Details

Disclaimer: This has previously been filed at #7011, and other prior discussion is at facebook/react#24802. Please feel free to immediately close this issue if the status remains "won't fix." However, I'd like to make the case for it again.

Proposed solutions

Solution 1: React 17 docs header

Add a clear header to the React 17 docs, perhaps only visible when redirected from the React 16 docs URL. The header could explicitly state that React 17 is close enough to React 16's API that the docs are usable for both, with a link to a page explaining in more detail and listing the few important changes. I feel that this would be well worth the time as a big improvement to the current flow, which is confusing and probably leads many developers to hunt for closed issues around this, like I did.

The advantage of this solution is that it would handle links to the React 16 documentation coming from anywhere, from bookmarks / blogs / etc.

Solution 2: Change copy of 'Previous versions' page

A more lightweight solution that would require fewer changes would be to update the 'Previous versions' page to mention this situation explicitly, and to only point to the React 17 docs. This would at least reduce confusion for developers arriving at that page.

Problem

Here is how my flow went, and I'm sure this is typical (at least it is for the several people who took the time to comment on the bugs above, and probably many more since the bugs are closed and most people won't take the time):

  • Currently use React 16 and want to refer to the docs for an API I already know has been changing from 15 -> 18, but am unsure how exactly. In other words, I definitely want the React 16 docs. I've been around this block before with many APIs, and I don't yet have the special knowledge that 16/17 are very close.
  • Visit the React docs at https://react.dev/
  • Search for 'Previous versions'
  • Find this page, leading me to reasonably believe that there are in fact up-to-date React 16 docs and that I can reach them by clicking this "16.react.dev" link:
image
  • Find myself redirected to the React 17 docs. Get confused, thinking there was probably a mistake (because I already know the React docs websites have been going through flux). Try to reach it manually by changing 17 to 16 in the URL. Get 'Server Not Found' (because the legacy URL does not have the redirect built in, apparently):
image
  • Start hunting for information on this state of affairs, eventually find the bugs mentioned above.

This took me around 10 minutes and was generally pretty disruptive and low on helpful information.

Please consider if one of the proposed solutions above is worth spending the time on to try and make this flow better. Thanks for your time!

@Rekl0w
Copy link
Contributor

Rekl0w commented Sep 10, 2024

PR submitted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants