MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / reducer

Function reducer

packages/react/test/redux.test.ts:433–441  ·  view source on GitHub ↗
(state: Record<string, unknown> = initialState, action: { type: string; newValue: any })

Source from the content-addressed store, hash-verified

431
432 const ACTION_TYPE = 'UPDATE_VALUE';
433 const reducer = (state: Record<string, unknown> = initialState, action: { type: string; newValue: any }) => {
434 if (action.type === ACTION_TYPE) {
435 return {
436 ...state,
437 value: action.newValue,
438 };
439 }
440 return state;
441 };
442
443 const store = Redux.createStore(reducer, enhancer);
444

Callers 1

sentryWrapReducerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected