git.fiddlerwoaroof.com
Browse code

Move initialization from location to after saga init

Ed Langley authored on 17/06/2017 19:05:10
Showing 1 changed files
... ...
@@ -86,15 +86,15 @@ const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
86 86
 // const composeEnhancers = compose;
87 87
 
88 88
 // create store
89
-const store = createStore(reduce,
89
+const store = createStore(
90
+  reduce,
90 91
   composeEnhancers(
91 92
     enhancer,
92 93
     applyMiddleware(
93 94
       middleware,
94 95
       sagaMiddleware
95
-      )
96
-    ));
97
-
96
+    )
97
+  ));
98 98
 
99 99
 const fetchArticle = function*({id}) {
100 100
   console.log('SAGA???');
... ...
@@ -120,6 +120,7 @@ const actions = {
120 120
   changeId: allActions.changeId
121 121
 };
122 122
 
123
+init();
123 124
 export default store;
124 125
 
125 126
 // store dependent helper function - thus defined after default export