Created
January 20, 2018 19:39
-
-
Save flushentitypacket/57ca081c0dca13c4b7145a972176c10d to your computer and use it in GitHub Desktop.
Typescript Redux combine features in index
This file contains hidden or 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
// store/todo/index.ts | |
import {combineReducers} from 'redux' | |
import { | |
State as TodoState, | |
reducer as todoReducer, | |
actions as todoActions, | |
} from './todo' | |
import { | |
State as RewardState, | |
reducer as rewardReducer, | |
actions as rewardActions, | |
} from './reward' | |
export interface State { | |
todos: TodoState | |
rewards: RewardState | |
} | |
export const reducer = combineReducers<State>({ | |
todos: todoReducer, | |
rewards: rewardReducer, | |
}) | |
export const actions = { | |
...todoActions, | |
...rewardActions, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment