Last active
July 22, 2020 18:04
-
-
Save alexmochu/8e39160ea410e8f18b51aabc2be38023 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