Redux State Management Library
github.com
2
Leaving SiteNav
External Link Disclaimer
You are about to visit github.com. This website is not operated by us. We are not responsible for its content or privacy practices.
About this website
Redux is a free and open-source predictable state container for JavaScript applications, primarily used with React. Created by Dan Abramov and Andrew Clark in 2015, Redux was inspired by Facebook's Flux architecture and the Elm programming language. Redux has become the most widely used state management library for React, used by Instagram, WhatsApp Web, and countless applications. Key features: single source of truth: the entire application state is stored in a single object tree (the store). This makes debugging, serialization, and state inspection straightforward. Actions: plain JavaScript objects with a type field describing what happened (type: 'ADD_TODO', payload: {...}). Actions are the only way to trigger state changes. Reducers: pure functions that take the current state and an action, returning a new state. Reducers must be pure (no side effects, no mutations). Store: created with createStore (or configureStore in Redux Toolkit) and holds the state tree. The store provides getState(), dispatch(action), and subscribe(listener) methods. Unidirectional data flow: UI dispatches actions, reducers compute new state, UI re-renders. This makes state changes predictable and traceable. Redux Toolkit (RTK): the official, opinionated toolkit for efficient Redux development (since 2019). RTK includes createSlice for boilerplate-free reducers and actions, createAsyncThunk for async logic, and RTK Query for data fetching. DevTools: Redux DevTools browser extension for time-travel debugging and action replay. Middleware: extensible middleware pipeline for logging, async actions (redux-thunk), and side effects (redux-saga, redux-observable). JavaScript/TypeScript. MIT.
Statistics
2
Views
0
Clicks
0
Like
0
Dislike