CodeVetter · Repo Unpack · Feature catalog
reduxjs/redux-toolkit
The user-facing product consists primarily of programming APIs and developer tooling. Store and reducer helpers address application-owned state, while RTK Query handles server-state requests and cache coordination. React examples expose fetching, editing, authentication, polling, and pagination interfaces. This catalog describes inspected capabilities and routes rather than claiming exhaustive coverage of every fixture.
- configureStore accepts a root reducer or reducer map, preloadedState, middleware/enhancer callbacks, and DevTools options; defaults include thunk middleware and automatic batching.
- createSlice produces actions, caseReducers, initial-state access, selectors, and injectInto; createReducer handles action cases and matchers with draft-aware immutable updates.
- createEntityAdapter supplies state factories, selectors, and entity operations, choosing a sorted or unsorted implementation from sortComparer and using instance.id unless selectId is supplied.
- createAsyncThunk exposes pending/fulfilled/rejected actions, abort and unwrap handles; listener effects additionally receive condition, take, delay, pause, fork, and cancellation controls.
- RTK Query supports query, mutation, and infiniteQuery definitions, generated query/lazy-query/mutation/infinite-query hooks, usePrefetch, optimistic cache updates, and optional retry wrapping.
- The inspected React demos include Pokémon loading/error display, post POST/PUT/DELETE operations with rollback, and /login plus a guarded index route; kitchen-sink exposes times, counters, posts, and bundle splitting.
- The infinite-query showcase routes cover pagination, infinite scroll, bounded pages, bidirectional cursors, limit/offset, pagination with infinite scroll, and RN FlatList; type-portability apps reproduce the times/posts/counters/bundle-splitting surface across module modes.
- Companion tooling includes graphqlRequestBaseQuery, the rtk-query-codegen-openapi CLI with configurable hooks/tags/naming/encoding, and a codemod CLI that selects TypeScript transforms such as createSliceBuilder.