Skip to content

Instantly share code, notes, and snippets.

@AllGistsEqual
Created February 1, 2021 22:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AllGistsEqual/33b49998ba2e376d241baa8e3b8d2b06 to your computer and use it in GitHub Desktop.
Save AllGistsEqual/33b49998ba2e376d241baa8e3b8d2b06 to your computer and use it in GitHub Desktop.
// File: src/redux/rootReducer.ts
import { combineReducers } from '@reduxjs/toolkit'
import { connectRouter } from 'connected-react-router'
import { History } from 'history' // TODO: check for updates to switch to more recent version of history
import counterReducer from './demo/counter'
const rootReducer = (history: History) =>
combineReducers({
counter: counterReducer,
router: connectRouter(history),
})
export default rootReducer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment