Rewrite React-Redux docs completely
See original GitHub issueThe current React-Redux docs aren’t very helpful, for a lot of reasons:
- They’re just a Markdown file in the repo, instead of being published in HTML form
- It feels very “dense” and jargon-heavy
- It doesn’t clearly lay out the various options for
connect
and ways that you can use it - It’s primarily in API reference form, rather than a “how to”
We do also have the “Using React with Redux” page over in the main Redux docs, which is a bit more of a “getting started” page, but it’s also not great.
So, I would really like to completely rewrite our React-Redux docs from scratch.
As a rough outline, what I’d like to see is:
- Quick Start (copy-pasteable examples that show how to add
<Provider>
and do a basic call toconnect()
- How It Works (an explanation of how
<Provider>
makes the store accessible, and roughly whatconnect
does internally to subscribe and extract data) - Advanced Techniques / Recipes (examples of things like using the “factory function” syntax for per-component selector memoization)
- API Reference (something similar to what we have now)
I do already have a Gitbook setup configured for this, same as the main Redux docs. I should be able to get the react-redux.js.org
domain name for this.
We can use some of the info from my Redux Fundamentals Workshop slides at https://blog.isquaredsoftware.com/2018/06/redux-fundamentals-workshop-slides/ to help fill this out.
There’s a related Redux docs issue for revamping the Redux portion of the docs at https://github.com/reduxjs/redux/issues/2591 as well.
update
Let’s track the outline and progress here:
- Introduction
- Quick Start
- Basic Tutorial
- Why Use React-Redux?
- Using React-Redux
- Connect:
mapState
- Connect:
mapDispatch
- Using Selector Functions
- Common Use Cases and Patterns
- Connect:
- Advanced Usage
- Connect Options
- Optimizing Performance
- How It Works
- Conceptual Implementation (not entirely sure about this page)
- Simplified Implementation Example (based on Dan’s gist)
- Actual Implementation Details
- FAQ
- ???
- API Reference
- Provider
- Connect
Issue Analytics
- State:
- Created 5 years ago
- Reactions:31
- Comments:61 (43 by maintainers)
Top GitHub Comments
We now have the React-Redux docs being published at https://react-redux.js.org ! Built with Docusaurus, hosted on Netlify, and we’ve got deploy previews turned on for PRs. I’m very excited about this!
Docs on how to test components using the
useSelector
hook would be nice. E.g. whether people should wrap in Provider with a mocked store, or mock useSelector, etc.