Mastering Redux with Redux toolkit, write a correct redux!

Andreas Sujono
7 min readAug 13, 2022

Redux is a popular state management library, used by numerous enterprise companies. Although many articles are against Redux because of the useContext or other minimalize libraries such as Zustand, Jaltio, etc. However, personally, I still think learning Redux will benefit us as a Frontend engineer, especially when it’s the most popular and most used by a lot of big companies.

“image: Freepik.com”. This cover has been designed using images from Freepik.com

Table of content

  1. Introduction
  2. Terminology
  3. How it works
  4. Redux toolkit introduction
  5. Example in a real app

Introduction

Let’s start with understanding what Redux is and its purpose of it. Basically, Redux is a library to manage global state in an application. Previously, there’s a lot of problems with how components can share their local state with others. This is where Redux comes to help. In the official document Here, you only need Redux if and only if your application has a medium to large codebase, the global shared state is complex, and frequent updates happening. If it’s not the case, I think React useContext is more than enough. Just remember that there’s no rendering optimization in useContext. You need to be careful structuring your context hook to prevent any…

--

--

Andreas Sujono
Andreas Sujono

Written by Andreas Sujono

A Full Stack Developer with 5 years of working experience, Web2 and Web3 Enthusiast, twitter: @AndreasSujono2

Responses (1)