How to Implement Redux in 24 Lines of JavaScript

90% convention, 10% library In this post Yazeed Bzadough walks you through creating your own Redux implementation. // simplified createStore function const createStore = (yourReducer) => { let listeners = []; let currentState = yourReducer(undefined, {}); return { getState: () => currentState, dispatch: (action) => { currentState = yourReducer(currentState, action); listeners.forEach((listener) => { listener(); }); […]

Manage React State with zustand

Small, fast and scaleable bearbones state-management solution. Has a comfy api based on hooks, that isn’t boilerplatey or opinionated, but still just enough to be explicit and flux-like. import create from 'zustand' const [useStore] = create(set => ({ count: 1, inc: () => set(state => ({ count: state.count + 1 })), dec: () => set(state […]

Inspecting Redux Stores in Production, without the Redux Devtools

Checking out the Redux Store of Soundcloud Redux Back in the day I learnt a lot by hitting CTRL+U (View Source) on websites. Nowadays I still check the source code of some apps, yet it’s become a tad more difficult for some specific things. When it comes to React apps that use Redux I like […]

How to use Redux in highly scalable JavaScript applications

Alexis Mangin: I have recently worked on the first version of a React-Native mobile app for one of my clients, which desired to architecture the app in a scalable way for a painless experience to add new features later. I believe we should always think about app architecture that way as it can always scale […]

Scaling your Redux App with ducks

It’s one of these things I too keep struggling with from time to time: do you organize your project files per type/functionality, or per feature? Alex Moldovan from FortechRomania: Our approach starts from the need to isolate the React code into a single folder — called views — and the redux code into a separate folder — called redux. Inside the […]

Plotly Academy: State Management with Redux

Learn how to handle application state in a centralized store with Redux, the most popular unidirectional data flow library! Wow, wish I had stumbled upon this magnificent tutorial when I was just getting started with Redux. Well written, with a very good example. State Management with Redux → This article forms a good addition to […]