This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { AnyAction, Slice } from '@reduxjs/toolkit' | |
/* The redux-toolkit maintainers refuse to add a way to disable immer.js for | |
* specific reducers, therefore we need to create an escape hatch by ourselves. | |
* Immer.js needs to be disabled in certain cases for performance reasons. | |
* Link: https://github.com/reduxjs/redux-toolkit/issues/242 | |
*/ | |
/** Add reducers without immer.js to a redux-toolkit slice */ | |
export function addRawReducers<S>( |