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

https://react-redux.js.org/api shows "7.1" version but outdated docs #1497

Closed
hjri opened this issue Jan 9, 2020 · 6 comments
Closed

https://react-redux.js.org/api shows "7.1" version but outdated docs #1497

hjri opened this issue Jan 9, 2020 · 6 comments
Labels

Comments

@hjri
Copy link

hjri commented Jan 9, 2020

Do you want to request a feature or report a bug?

Yes

What is the current behavior?

I got on https://react-redux.js.org/api most likely from a DDG search or somebody linking it in SO or something. Documentation lists createProvider which we were using but was removed since version 6 or so, however label on top shows version 7.1 so it was very confusing that API documentation is outdated and there are no references to createProvider in documentation source

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to a CodeSandbox (https://codesandbox.io/s/new) or RN Snack (https://snack.expo.io/) example below:

  1. Open up https://react-redux.js.org/api#createprovider
  2. See version at top say "7.1"
  3. Try to use createProvider - it's gone
  4. (optional) Look all over source code for it to see if it was removed and why documentation lists it and if removal was intended or accident or what
  5. (optional) Make this bug report

What is the expected behavior?

https://react-redux.js.org/api redirects to most recent documentation or gives 404 or updated to reflect recent changes or show correct version.

Which versions of React, ReactDOM/React Native, Redux, and React Redux are you using? Which browser and OS are affected by this issue? Did this work in previous versions of React Redux?

Firefox.

@markerikson
Copy link
Contributor

Hmm. That.... page shouldn't even exist? We now have individual docs pages for the different APIs (connect, <Provider>, etc). The only mentions of createProvider at all are in the v5 versioned docs:

https://github.com/reduxjs/react-redux/search?q=createprovider&unscoped_q=createprovider

and while there was briefly a /api individual page, that should only exist under the v5 section:

https://react-redux.js.org/5.x/api

I'm not even sure how that page was created at this point.

In addition, note that it's not showing the left sidebar at all, which is an indication that this page is orphaned somehow.

@wgao19 , @yangshun : any idea what's happening here?

@hjri
Copy link
Author

hjri commented Jan 9, 2020

just a hunch - it could be a cache issue or a leftover from older build that wasn't cleared properly

@yangshun
Copy link

yangshun commented Jan 9, 2020

This is a bug/feature/flaw of the v1 versioning system. Any files within docs will have a page created and in v1, because the versioning system only creates new files if it differs from the previous version, it is unable to differentiate if a file is removed or if it was unchanged. Sadly this is a flaw in the design and is not possible to change in v1 without breaking users who rely on this behavior. Once a doc page is created, it cannot be removed unless the root fallback is removed. One way to fix this is to delete the v5 docs, which is probably not a good idea. More info in facebook/docusaurus#2123.

This issue is addressed in v2's versioning approach which snapshots all the docs for a version and doesn't use any flawed fallback logic.

@markerikson
Copy link
Contributor

@yangshun : now that we've got Redux Toolkit and the Redux core docs updated to v2, would someone be able to tackle updating React-Redux to v2 as well?

@yangshun
Copy link

yangshun commented Jan 9, 2020

It's gonna be a complicated move and this will be the first versioned site to move. I'll probably take up this migration myself, but it'll take a while.

@timdorr timdorr added the docs label Jan 31, 2020
@markerikson
Copy link
Contributor

We've upgraded to DSv2 in #1638 , so I think this is fixed now.

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

No branches or pull requests

4 participants