Created
July 10, 2020 06:46
-
-
Save mcjcloud/b688e3612f21fd4d9b031a37ba065fad to your computer and use it in GitHub Desktop.
Asterisk Medium Article: redux
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 { applyMiddleware, combineReducers, createStore } from "redux" | |
import thunk from "redux-thunk" | |
import todo, { TodoAction } from "./todo" | |
// Action Types | |
export type Action = TodoAction | |
const reducer = combineReducers({ todo }) | |
export type State = ReturnType<typeof reducer> | |
// create the redux store | |
export default createStore<State, any, any, any>(reducer, {}, applyMiddleware(thunk)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment