CodeVetter · Repo Unpack · Extension points
reduxjs/redux
Core extensibility comes from function interfaces rather than a named plugin registry. Reducers define state transitions, middleware wraps dispatch, and enhancers wrap store creation. Runtime reducer replacement and observable interoperability expose additional integration seams. Website extensibility uses explicit library metadata, Docusaurus plugin instances, navbar component registration, and configurable Markdown transformation hooks.
- A custom root reducer plugs directly into createStore; the Reducer type separates returned state, accepted actions, and optional preloaded-state input shape.
- Reducer maps plug into combineReducers, whose mapped types infer combined state, action unions, and partial preloaded state; only function-valued entries participate at runtime.
- Middleware plugins implement api => next => action with unknown action inputs and outputs; applyMiddleware overloads accumulate middleware dispatch extensions into the enhanced store type.
- StoreEnhancer wraps a StoreEnhancerStoreCreator and combines store/state extensions; createStore delegates to the enhancer before allocating its own base store.
- replaceReducer supports dynamic reducer loading and hot replacement, while the observable method provides reactive-library integration using Symbol.observable or the @@observable fallback.
- Adding an external documentation library involves the sources acquisition table, libraries navigation metadata, and a Docusaurus docs-plugin instance; these are separate explicit configuration seams.
- Navbar ComponentTypes registers custom-libraryDropdown and custom-libraryLinks; useCurrentLibrary chooses a non-root route prefix match, then root metadata, then the first library.
- transpileCodeblocks accepts custom compiler settings, TypeScript/JavaScript post-processors, replacement-node assembly, and file extensions; code-block metadata can explicitly opt out with no-transpile.