MCPcopy
hub / github.com/reduxjs/redux / persistReducer

Function persistReducer

test/typescript/enhancers.ts:278–292  ·  view source on GitHub ↗
(
    config: any,
    reducer: Reducer<S, A, PreloadedState>
  )

Source from the content-addressed store, hash-verified

276 }
277
278 function persistReducer<S, A extends Action, PreloadedState>(
279 config: any,
280 reducer: Reducer<S, A, PreloadedState>
281 ) {
282 return (
283 state: (S & ExtraState) | PreloadedState | undefined,
284 action: A
285 ) => {
286 const newState = reducer(state, action)
287 return {
288 ...newState,
289 foo: 'hi'
290 }
291 }
292 }
293
294 function persistStore<S>(store: S) {
295 return store

Callers 1

createPersistEnhancerFunction · 0.85

Calls 1

reducerFunction · 0.70

Tested by

no test coverage detected