DEV Community

Discussion on: Just Redux: The Complete Guide

Collapse
 
markerikson profile image
Mark Erikson

Hi, I'm a Redux maintainer. The good news is this post does a good job of covering some of the basics of Redux. However, "modern Redux" is very different from what's shown in this tutorial. Today we teach using our official Redux Toolkit package to write your Redux logic. It includes utilities to simplify several common Redux use cases, including store setup, defining reducers, immutable update logic, and even creating entire "slices" of state at once. Unfortunately, most tutorials online are out of date and show practices that result in a lot of extra code being written.

For details on using Redux Toolkit (and the React-Redux hooks API), see our official Redux docs pages:

Collapse
 
thesanjeevsharma profile image
Sanjeev Sharma

Hey Mark!
Yes, I am aware of it. I will write a detailed explanation on Redux toolkit as well. Infact. that's what I use for my side projects now a days. :)

The intention of this post was to help people know that a lot of stuff is not that hard. And some jobs like mine still use the old way, so it will help.

This article is more for me than others, actually. By writing I can remember concepts, which might be helpful in some other areas. Also, reading and exploring satisfies my hunger to learn more.

Apart from this, I deep dived into Redux after interacting with you on Reddit. We had a short chat about ContextAPI vs Redux. :)

Collapse
 
markerikson profile image
Mark Erikson

Gotcha :) This is a well-written article, btw - just want to make sure others are aware that RTK exists since the article didn't mention it

Thread Thread
 
thesanjeevsharma profile image
Sanjeev Sharma

Fair point! Added a link to the Redux toolkit in the end.

Collapse
 
raibtoffoletto profile image
Raí B. Toffoletto

I want to take the opportunity to thank you guys for the toolkit!! I love using it with react. Cheers to you all!!

Collapse
 
spiropoulos94 profile image
NikosSp

I have to admit redux toolkit is amazing, as it adresses redux's biggest problem : BOILERPLATE

But, in my opinion, it would be very useful for someone to work on redux before toolkit, in order to better understand the underlying technology.

This way she/he will appreciate redux toolkit's offerings even more!

Collapse
 
thesanjeevsharma profile image
Sanjeev Sharma • Edited

Yes! Totally in favour of this.

RTK would be appreciated more if people know about old way doing things in Redux.

Thread Thread
 
markerikson profile image
Mark Erikson

FWIW, that's why we have two different tutorials in our docs:

  • "Essentials": jumps straight into RTK as the default Redux syntax, for people who just want to know "how to use Redux the right way" without worrying about how it works inside
  • "Fundamentals": teaches how Redux works from the ground up, so that you understand all the principles and mechanics first
Collapse
 
mliakos profile image
Emmanouil Liakos • Edited

Totally agree on this! When I first started to learn Redux, I decided to begin a series on this having exactly that in mind: Looking under the hood before using any abstractions.

For anyone interested it's here: Real-time app using React, Redux, Tailwind CSS & Firebase - Part 1