Redux Best Practices

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • Immer

    Create the next immutable state by mutating the current one

  • It is fully written in Typescript and is highly recommended that Redux Toolkit is used instead of the original Redux when using it for managing global state. It offers a flexible API, making it possible for making the state management scalable without having to worry about the limits of the library. One of the key concepts of Redux is immutability, and Redux Toolkit makes it easier than ever to keep the immutability by already setting up the ImmerJS library internally, so the developer does not have to worry about accidentally modifying the state directly. One of the most noticeable things for developers when switching to Redux Toolkit is the way reducers are created. Previously we used action creators and created a reducer where we handled all the actions. Now we can use the createSlice API to create reducers and it will eliminate the need to write action creators by creating them for you. An example of createSlice can be seen below:

  • redux-devtools

    DevTools for Redux with hot reloading, action replay, and customizable UI

  • When an action is dispatched, all of the reducers will be notified and every single one of them will check if they can handle the action. Not only that, but the Redux dev tools will be a mess trying to see what action was fired when. That’s why we should try to think of actions as events that happened and not what the action is changing. For example, we should rather have an action called userLoggedIn than setUserId.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • redux-toolkit

    The official, opinionated, batteries-included toolset for efficient Redux development

  • Redux Toolkit is a wrapper library written for the original Redux for the sake of making it easier, and faster to use Redux by reducing the boilerplate and introducing features such as thunks out of the box without having to install third-party libraries.

  • redux

    A JS library for predictable global state management

  • Redux is a library used for global state management, meaning if you have a piece of state that you want to access in different places of your app, you can use Redux to manage that state and make it easily accessible anywhere. The global state can be anything from logged-in user information to UI state such as theme, etc.

  • React

    The library for web and native user interfaces.

  • Redux is being used a lot together with React apps, however, it is possible to use Redux with any other library. Make sure you check out this tutorial on how to use Redux with React.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts