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

Function customMiddleware

test/typescript/middleware.ts:88–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86 type State = { field: 'string' }
87
88 const customMiddleware: Middleware<{}, State> = api => next => action => {
89 api.getState().field
90 // @ts-expect-error
91 api.getState().wrongField
92
93 return next(action)
94 }
95
96 return customMiddleware
97}

Callers

nothing calls this directly

Calls 2

nextFunction · 0.70
getStateMethod · 0.65

Tested by

no test coverage detected