Skip to content

Instantly share code, notes, and snippets.

@JonJam
Last active October 25, 2017 18:10
Show Gist options
  • Save JonJam/bd3748ba8892512d369838cc7894b38f to your computer and use it in GitHub Desktop.
Save JonJam/bd3748ba8892512d369838cc7894b38f to your computer and use it in GitHub Desktop.
react-redux-ts: Store
import { applyMiddleware, createStore } from "redux";
import thunkMiddleware from "redux-thunk";
import rootReducer from "../reducers/rootReducer";
import IStoreState from "./IStoreState";
export default function configureStore() {
return createStore<IStoreState>(
rootReducer,
applyMiddleware(thunkMiddleware)
);
}
export default interface IStoreState {
readonly pendingActions: number;
readonly isAuthenticated: boolean;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment