UNPKG

@reduxjs/toolkit

Version:

The official, opinionated, batteries-included toolset for efficient Redux development

15 lines (13 loc) • 371 B
import type { InternalHandlerBuilder } from './types' import { registerMiddleware } from './registration' export const buildDevCheckHandler: InternalHandlerBuilder = ({ api, context: { apiUid }, reducerPath, }) => { return (action, mwApi) => { if (api.util.resetApiState.match(action)) { registerMiddleware(api, mwApi, apiUid, reducerPath) } } }