Created
February 15, 2020 17:52
-
-
Save r3dm1ke/84d6eade7d7ca334f2becd53140951f4 to your computer and use it in GitHub Desktop.
Creating store with interceptor middleware
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
| import { applyMiddleware, createStore } from 'redux'; | |
| import reducer from 'WHERE YOUR REDUCER IS'; | |
| import interceptorMiddleware from 'WHERE YOUR MIDDLEWARE IS'; | |
| const store = createStore( | |
| reducer, | |
| undefined, // initial state, none in this case | |
| applyMiddleware(interceptorMiddleware) | |
| ); | |
| export default store; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment