DEV Community

Discussion on: React - Redux In Less Then 7 Minutes

Collapse
 
markerikson profile image
Mark Erikson

Hi, I'm a Redux maintainer. Please note that "modern Redux" code is very different than what most older tutorials show. We've introduced newer APIs like Redux Toolkit, which is a set of utilities that provide a light abstraction to simplify the most common Redux tasks, and the React-Redux hooks API, which is generally easier to use than the traditional connect API.

I strongly recommend reading through the newly rewritten official tutorials in the Redux docs, which have been specifically designed to teach you how Redux works and show our recommended practices:

  • "Redux Essentials" tutorial: teaches "how to use Redux, the right way", by building a real-world app using Redux Toolkit
  • "Redux Fundamentals" tutorial: teaches "how Redux works, from the bottom up", by showing how to write Redux code by hand and why standard usage patterns exist, and how Redux Toolkit simplifies those patterns

The older patterns shown in almost all other tutorials on the internet are still valid, but not how we recommend writing Redux code today.

You should also read through the Redux "Style Guide" docs page, which explains our recommended patterns and best practices. Following those will result in better and more maintainable Redux apps.

In addition, the easiest way to start a new project is with the official Redux+JS template for Create-React-App. It comes with Redux Toolkit and the React-Redux hooks API already set up when the project is created.

Collapse
 
meddy672 profile image
Matt Eddy • Edited

Thank you for the feedback. How old are the methods used in this tutorial compared to that of the redux toolkit?

Collapse
 
markerikson profile image
Mark Erikson

The patterns shown here are the original Redux usage patterns that we've shown since day 1: hand-written immutable update logic, SCREAMING_SNAKE_CASE constants, separate "actions" and "reducers" files, and use of connect.

The pieces that we now call "modern Redux" have come out over time:

  • The React-Redux hooks API was launched in React-Redux v7.1, in June 2019
  • The Redux "Style Guide" page was published in fall 2019
  • Redux Toolkit 1.0 was released in October 2019
  • Last year I rewrote the Redux docs tutorials from scratch. I published the "Essentials" tutorial around June, and the "Fundamentals" tutorial at the end of October
Collapse
 
meddy672 profile image
Matt Eddy

Also how do you become an active contributor of the redux api? I think this would be valuable information for those who are looking for ways to get involved with an open source project. May we connect with directly?

Collapse
 
markerikson profile image
Mark Erikson

I'm always interested in having folks contribute to Redux! Now, having said that: the Redux core library is stable and there's no active development work going on there. Same with React-Redux for now.

There is some active development work going on with Redux Toolkit, but it's primarily myself and a couple other maintainers atm.

Beyond that, there's a ton of work that I want to do with the Redux docs that I don't have time to do all by myself:

github.com/reduxjs/redux/issues/3592

and I'd definitely love to have folks get involved with that effort. (I actually got started with Redux by contributing the Redux FAQ to the docs back in early 2016.)

I hang out in the #redux channel in the Reactiflux Discord ( reactiflux.com ). Feel free to drop by and say hi.

Thread Thread
 
meddy672 profile image
Matt Eddy

I will check this out myself and also advertise this on this article.

Collapse
 
meddy672 profile image
Matt Eddy

I was unable to access the discord channel, but I would be happy to knock out a few of those issues you have on your repository. Do we just fork the repository and work the issues as described?

Collapse
 
markerikson profile image
Mark Erikson

Hmmm. Anyone should be able to sign up for a Discord account if you don't have one yet, and then join the Reactiflux discord. We do have a welcome flow where you have to agree to the community guidelines before you can access any other channels, so make sure you tried that.

If there's a particular issue you're interested in working on, leave a comment in that issue thread and we can discuss details.

Thread Thread
 
meddy672 profile image
Matt Eddy • Edited

I was able to get access to the channel taking a moment to review the welcome content and I have left a comment on the repo. #3591