-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Shota Matsushita
committed
Nov 23, 2016
1 parent
685a50e
commit aef4bf2
Showing
4 changed files
with
45 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import Reactotron from 'reactotron-react-js'; | ||
import { reactotronRedux } from 'reactotron-redux'; | ||
import sagaPlugin from 'reactotron-redux-saga'; | ||
|
||
export default Reactotron | ||
.configure({ name: 'difftron connect' }) | ||
.use(reactotronRedux()) | ||
.use(sagaPlugin()) | ||
.connect(); |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { createStore, applyMiddleware, compose } from 'redux'; | ||
import createSagaMiddleware from 'redux-saga'; | ||
import { autoRehydrate } from 'redux-persist'; | ||
import rootReducer from '../Reducers/'; | ||
import sagas from '../Sagas/'; | ||
import persistTransform from '../Services/ImmutablePersistenceTransform'; | ||
|
||
const middleware = []; | ||
const sagaMiddleware = createSagaMiddleware(); | ||
middleware.push(sagaMiddleware); | ||
|
||
const enhancers = []; | ||
|
||
// createStore | ||
export default () => { | ||
enhancers.push(applyMiddleware(...middleware)); | ||
enhancers.push(autoRehydrate()); | ||
|
||
// Store生成 | ||
const store = createStore(rootReducer, compose(...enhancers)); | ||
// state永続化設定 | ||
persistTransform(store); | ||
|
||
// run sagas | ||
sagaMiddleware.run(sagas); | ||
|
||
return store; | ||
}; |
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