Created
July 24, 2020 10:53
-
-
Save alexmochu/abaf7bafb1c269dfb19054b85b9d3d56 to your computer and use it in GitHub Desktop.
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 { combineReducers } from '@reduxjs/toolkit' | |
import clicksReducer from './counter' | |
const clicks = { count: clicksReducer } | |
export let rootReducer = combineReducers({ | |
...clicks | |
}) | |
export default function createReducer(injectedReducers = {}) { | |
rootReducer = combineReducers({ | |
...clicks, | |
...injectedReducers, | |
}); | |
return rootReducer; | |
} | |
export type RootState = ReturnType<typeof rootReducer> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment