Skip to main content
Exécutez n'importe quel Skill dans Manus
en un clic

core-reducers

Étoiles0
Forks1
Mis à jour13 juillet 2026 à 17:00

createReducer<State>(initialState) returns a reducer whose .with(action, fn) chain-registers pure handlers and returns the same reducer (fluent builder — no .build() needed). The reducer is a function (state = initialState, action) that dispatches to the registered handler by action.type. Reducers must be pure and immutable — no side effects, no mutation, no Date.now(). Reducers update canonical state only and never maintain selector-derived fields. Return the same reference when nothing changes so selector reference-equality memoization and test ref-equality assertions pass. `.initialState` is exposed for tests.

Installation

Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.

SKILL.md
readonly