CodeVetter · Repo Unpack · Feature catalog
reduxjs/redux
Redux exposes state-management APIs rather than an application router or hosted backend. Users can create stores, subscribe to changes, compose reducers, bind action creators, customize dispatch, replace reducers, and consume observable state. Teaching applications demonstrate counters, todos, shopping carts, and normalized trees. The website adds multi-library navigation, search, production error explanations, and opt-in live examples.
- Stores expose dispatch, subscribe, getState, replaceReducer, and an observable interoperability method; createStore initializes reducers before returning this interface.
- combineReducers creates a root reducer from function-valued map entries, producing one state slice per accepted key and rejecting undefined slice outputs.
- bindActionCreators accepts a single function or a function map, preserves invocation arguments and this, dispatches each result, and skips non-function map values.
- applyMiddleware customizes dispatch through composable wrappers; compose supports right-to-left composition, an identity function for zero inputs, and unchanged return of a single function.
- The TypeScript counter offers increment, decrement, numeric amount addition, delayed async addition, and conditional addition when the current value satisfies currentValue % 2 === 1.
- The todos example appends and toggles todos and selects all, completed, or active items through its connected visible-list container.
- The shopping-cart example loads mock products, permits additions only when inventory is positive, and clears the cart on checkout request; the tree example supports node counters, child creation, and descendant deletion.
- The site provides navigation and search tabs for Redux, Toolkit, React Redux, and Reselect, renders error messages selected by ?code=N, and starts StackBlitz examples only after user activation on an isolated page.