forked from phobal/ivideo
-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
5750a46
commit d4497e6
Showing
10 changed files
with
103 additions
and
42 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
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,19 @@ | ||
import React, { Component, PropTypes} from 'react'; | ||
import DevTools from './DevTools'; | ||
|
||
|
||
export default class App extends Component { | ||
static propTypes = { | ||
children: PropTypes.element.isRequired | ||
}; | ||
|
||
render() { | ||
return ( | ||
<div> | ||
{this.props.children} | ||
<DevTools /> | ||
</div> | ||
); | ||
} | ||
} | ||
|
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 |
---|---|---|
@@ -1,17 +1,5 @@ | ||
import React, { Component, PropTypes} from 'react'; | ||
|
||
|
||
export default class App extends Component { | ||
static propTypes = { | ||
children: PropTypes.element.isRequired | ||
}; | ||
|
||
render() { | ||
return ( | ||
<div> | ||
{this.props.children} | ||
</div> | ||
); | ||
} | ||
if (process.env.NODE_ENV === 'production') { | ||
module.exports = require('./App.production'); | ||
} else { | ||
module.exports = require('./App.development'); | ||
} | ||
|
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,16 @@ | ||
import React, { Component, PropTypes} from 'react'; | ||
|
||
export default class App extends Component { | ||
static propTypes = { | ||
children: PropTypes.element.isRequired | ||
}; | ||
|
||
render() { | ||
return ( | ||
<div> | ||
{this.props.children} | ||
</div> | ||
); | ||
} | ||
} | ||
|
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,13 @@ | ||
import React from 'react'; | ||
import { createDevTools } from 'redux-devtools'; | ||
import LogMonitor from 'redux-devtools-log-monitor'; | ||
import DockMonitor from 'redux-devtools-dock-monitor'; | ||
|
||
export default createDevTools( | ||
<DockMonitor | ||
toggleVisibilityKey="H" | ||
changePositionKey="Q" | ||
> | ||
<LogMonitor /> | ||
</DockMonitor> | ||
); |
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,27 @@ | ||
import { createStore, applyMiddleware, compose } from 'redux'; | ||
import { persistState } from 'redux-devtools'; | ||
import thunk from 'redux-thunk'; | ||
import rootReducer from '../reducers'; | ||
import DevTools from '../containers/DevTools'; | ||
|
||
const finalCreateStore = compose( | ||
applyMiddleware(thunk), | ||
DevTools.instrument(), | ||
persistState( | ||
window.location.href.match( | ||
/[?&]debug_session=([^&]+)\b/ | ||
) | ||
) | ||
)(createStore); | ||
|
||
export default function configureStore(initialState) { | ||
const store = finalCreateStore(rootReducer, initialState); | ||
|
||
if (module.hot) { | ||
module.hot.accept('../reducers', () => | ||
store.replaceReducer(require('../reducers')) | ||
); | ||
} | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,5 @@ | ||
import { createStore, applyMiddleware } from 'redux'; | ||
import thunk from 'redux-thunk'; | ||
import reducer from '../reducers'; | ||
|
||
const createStoreWithMiddleware = applyMiddleware( | ||
thunk | ||
)(createStore); | ||
|
||
export default function configureStore(initialState) { | ||
const store = createStoreWithMiddleware(reducer, initialState); | ||
|
||
if (module.hot) { | ||
// Enable Webpack hot module replacement for reducers | ||
module.hot.accept('../reducers', () => { | ||
const nextReducer = require('../reducers'); | ||
store.replaceReducer(nextReducer); | ||
}); | ||
} | ||
|
||
return store; | ||
if (process.env.NODE_ENV === 'production') { | ||
module.exports = require('./configureStore.production'); | ||
} else { | ||
module.exports = require('./configureStore.development'); | ||
} |
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,11 @@ | ||
import { createStore, applyMiddleware, compose } from 'redux'; | ||
import thunk from 'redux-thunk'; | ||
import rootReducer from '../reducers'; | ||
|
||
const finalCreateStore = compose( | ||
applyMiddleware(thunk) | ||
)(createStore); | ||
|
||
export default function configureStore(initialState) { | ||
return finalCreateStore(rootReducer, initialState); | ||
} |
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