I spent a _lot_ of time and effort trying to put this together [0]. The existing tutorial sequence has been read by a lot of people over the years, but it takes a "bottom-up" approach: it teaches how each of the Redux pieces work in isolation, and builds up from there. That tutorial is also one of the oldest parts of our docs, and it was written in a much different era for a different audience: when "Flux" was still a thing, and people were looking at migrating away from Backbone.
This new "Redux Essentials" tutorial has several goals:
- It takes a "top-down" approach, with a focus on "how to use Redux, the right way", rather than "how it works".
- It teaches our latest recommended patterns and practices, like using our official Redux Toolkit package [1] for writing your Redux logic, and using the React-Redux hooks API [2] instead of the earlier `connect` API.
- It shows how to build a somewhat more realistic example app, and explains various Redux concepts and APIs as we add new features.
- Improve explanations and make it more clear how Redux integrates into a typical React app, and how data flows through a Redux application.
I'm hopeful that this new tutorial will make it easier for people to jump right into learning Redux and building something useful with it, and they can look more into "how does it work inside?" later.
The new tutorial is part of my ongoing effort to rewrite most of the Redux docs [3]. I'd previously written the new "Redux Style Guide" docs page [4], which lists our recommended best practices.
My next task is to rewrite the existing "Basics/Advanced" tutorial sequence [5]. My plans for that section are:
- Drop all outdated references ("Flux", "containers", etc)
- Show simpler patterns (inline action types like `{type: "todos/addTodo"}` vs `const ADD_TODO = "ADD_TODO"`, single-file Redux logic)
- CodeSandbox examples
- Show React-Redux hooks
- Improve explanation flow
If anyone's got any feedback, suggestions, or questions, let me know!
[0] https://github.com/reduxjs/redux/pull/3740#issuecomment-6508...
[1] https://redux-toolkit.js.org
[2] https://react-redux.js.org/api/hooks
[3] https://github.com/reduxjs/redux/issues/3592
[4] https://redux.js.org/style-guide/style-guide
[5] https://github.com/reduxjs/redux/issues/3595#issuecomment-55...