question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rewrite React-Redux docs completely

See original GitHub issue

The 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 to connect()
  • How It Works (an explanation of how <Provider> makes the store accessible, and roughly what connect 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
  • 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:open
  • Created 5 years ago
  • Reactions:31
  • Comments:61 (43 by maintainers)

github_iconTop GitHub Comments

10reactions
markeriksoncommented, Oct 6, 2018

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!

3reactions
ThiefMastercommented, Jul 25, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Redux Fundamentals, Part 5: UI and React
The official Redux Fundamentals tutorial: learn how to use Redux with React.
Read more >
React Docs Beta
We are rewriting the React documentation with a few differences: All explanations are written using Hooks rather than classes. We've added interactive ...
Read more >
Introducing Hooks - React
Completely opt-in. You can try Hooks in a few components without rewriting any existing code. But you don't have to learn or use...
Read more >
State and Lifecycle - React
We call root.render() to change the rendered output: ... State is similar to props, but it is private and fully controlled by the...
Read more >
Higher-Order Components - React
HOCs are common in third-party React libraries, such as Redux's connect and Relay's ... withSubscription and the wrapped component is entirely props-based.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found