Skip to content
This repository has been archived by the owner on Mar 30, 2021. It is now read-only.

Add root store with middleware. #30

Merged
merged 4 commits into from
Feb 9, 2016
Merged

Conversation

simoneduca
Copy link
Contributor

This is the first of a series of PRs intended to make network requests (fetching classrooms, login, etc) to work with redux-thunk middleware. The point of using a middleware layer is that we can dispatch other things other than actions, e.g. functions, to delay the execution of an action.
Here applyMiddleware makes sure that the middleware is available in the actions dispatch method.
Webpack's Hot Module Replacement makes sure modules (reducers in this case) are kept updated.

@@ -0,0 +1,18 @@
import { createStore, applyMiddleware } from 'redux';
import thunkMiddleware from 'redux-thunk';
//import rootReducer from '../reducers';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trash this if we don't need it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rogerhutchings updated.

rogerhutchings added a commit that referenced this pull request Feb 9, 2016
@rogerhutchings rogerhutchings merged commit 6bf3601 into master Feb 9, 2016
@rogerhutchings rogerhutchings deleted the middleware-create-store branch February 9, 2016 12:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants