Skip to content

Instantly share code, notes, and snippets.

@alexmochu

alexmochu/index.ts

Last active Jul 22, 2020
Embed
What would you like to do?
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