DEV Community

[Comment from a deleted post]
Collapse
 
markerikson profile image
Mark Erikson

Hi, I'm a Redux maintainer.

I wrote a comment on your last Redux tutorial post saying that unfortunately the patterns shown in that post are very out of date, and that today we teach simpler Redux usage patterns that are easier to learn. In particular, we teach Redux Toolkit as the default way to use Redux, but even if you are learning the basics of writing Redux code by hand, we now teach those same ideas in simpler ways.

I hate to keep saying this, but the patterns shown in this tutorial post are also very outdated and not how we want people learning or using React-Redux today.

There's several issues here.

First, the actual Redux logic shown (reducers, etc) is still being written "by hand" instead of using Redux Toolkit.

Beyond that, though, we now teach very different patterns for using React-Redux.

The "container/presentational component" concept is still valid, and it's a thing that you can do if you want to. But, the React community has moved away from that approach, in part due to the arrival of React Hooks. I talked about this change in a blog post and conference talk:

The original Redux tutorials did previously teach the "container/presentational" concept in the "Basics > React" tutorial page.

However, when I rewrote our tutorials last year, I completely removed any mentions of the "container/presentational" pattern from our docs.

In addition, we now recommend the React-Redux hooks API as the default approach for use in your React components, and we teach the hooks API as the right approach in our tutorials:

Again, I appreciate that you took the time to write these tutorials.

But, please update these tutorials to match how we recommend using Redux today!

Collapse
 
latobibor profile image
András Tóth

I never really liked redux with its faux functional programming attempt in a language that does not support it (neither it does OOP anyway). It had always unnecessary layers to create and maintain and obfuscate. Redux Toolkit is a step in the right direction, however OvermindJS is already many steps ahead:
overmindjs.org/

It also works out of the box with TypeScript (after a little configuration).

Collapse
 
cenacr007_harsh profile image
KUMAR HARSH

I will check overmind.js out.

 
latobibor profile image
András Tóth

It is going to be eye-opening. Especially if you compare working with classes. Immutability is implemented through the new Proxy feature of JS, so you can write state.something = 'stuff' without doing state = { ...state, something: 'stuff' } (just as with redux-toolkit).

 
cenacr007_harsh profile image
KUMAR HARSH

Currently working on Redux toolkit, will soon check out overmind for sure.

Collapse
 
cenacr007_harsh profile image
KUMAR HARSH • Edited

Thanks for taking out the time to comment again but I am writing a series of blogs which will gradually move to modern practices so don't worry I will soon be writing a blog with modern react practices and how redux is easy-to-use now, and I mentioned this in the blog as well why I wrote this blog, because people need to know this to understand older code bases and I believe when we firsthand realize the complexity of something then we appreciate the tools that solve those complexities for us so much more.

Thanks for providing some extra tips as well, I will surely add those links in my future blogs so that everyone can stay upto date with the modern practices.

Collapse
 
markerikson profile image
Mark Erikson

I get what you're saying, but I disagree with the approach.

It's possible to teach the basics, and yet also be very clear up front that "this is to help you understand how it works, but not how you should write it in the real world". It's also possible to teach those basics in a friendlier way than the original old-style approaches. I know, because this is what I did in that "Redux Fundamentals" tutorial.

The problem is that neither of these two posts so far have had any indication that "the patterns that are shown here are actually out of date", or that "later articles will show more modern approaches". And, by spending so much time on these outdated patterns, you're doing readers a disservice going forward.

 
cenacr007_harsh profile image
KUMAR HARSH

Sorry to say this but I don't think I have any right to say " you shouldn't be writing this way', these 2 blogs are a sum up of the entire freecodecamp curriculum from where I have learnt and thousands are also learning everyday, if they have not updated their curriculum and they are supposed to be one of the largest developers community, then what can I do. I am no react or redux expert in any way, I am a beginner who is learning and sharing his journey and that is it, and freecodecamp is a big thing, it's not like I followed an outdated Udemy course and sharing old things, although I agree with you that modern practices will benefit us more, but saying it's a disservice to my readers is a bit harsh because this is what I have learnt from freecodecamp and countless others are also learning from there everyday.

Anyways I will keep your suggestions in mind going forward and try to learn the new ways of doing things soon and share them with others.

Thank You!

 
phryneas profile image
Lenz Weber

Honestly, you are not writing these articles from a beginner's perspective. You are not titling them "This is what I learned at FreeCodeCamp today", but you are titling them "Complete Introduction to React-Redux".
You are writing them from an educator's perspective and other people will try to learn from them. And that comes with responsibiliy. It's bad enough that FreeCodeCamp is showing two years outdated practices, but it gets even worse when more tutorials with a current date do the same.
As an instrcuctor, you should validate your sources and do your due diligence.
And it can't be too much to expect that in that teacher role you go to the official React-Redux docs and at least read through the "Getting Started" introduction before publishing a post like this.
And if you do that, you will notice that the only code the React-Redux "getting started" page and this blog post share is the Provider wrapper.

 
markerikson profile image
Mark Erikson

Unfortunately, FreeCodeCamp's curriculum is also outdated :( I've talked with the FCC folks, and they have plans to redo and update the curriculum, but no idea when that will happen.

For that matter, most Redux tutorials on the internet are outdated at this point. I get that many people prefer learning from courses and blog posts rather than looking at official docs, but this is part of the downside - there's no guarantee that whatever course someone's looking at has actually been kept up to date with changes in that tool.

In this case, as I said, we've drastically changed how we recommend that people learn and use Redux. There are a few courses and tutorials that show the right patterns - for example, freecodecamp.org/news/redux-for-be... is pretty good . But, most courses on Redux have not been updated.

This is why it's important to actually look at official docs as well. As I mentioned earlier, we rewrote our tutorials from scratch last year to teach these newer patterns, and reading through those will show you the differences.

So, I apologize if I came across harshly, but A) I don't know your skill level, B) the patterns in these posts aren't how we want people learning Redux, and C) I'm having to respond to many other similar posts and tutorials as well that are not up to date.

 
cenacr007_harsh profile image
KUMAR HARSH • Edited

I understand your point, I already had a side note in the original blog post and I now will add a disclaimer at the top and a link to the official documentation as well. Thank You!

 
cenacr007_harsh profile image
KUMAR HARSH

I am a beginner so it never really occured to me freecodecamp curriculum could be so heavily outdated. In the developer world there are new things coming out everyday but as it has been pointed out to me, it's not about new practices but the whole setup of Redux has been changed drastically. I will add a disclaimer and a link to the original docs as well in the blog.