diff --git a/src/containers/home_container.js b/src/containers/home_container.js new file mode 100644 index 0000000..69b5eec --- /dev/null +++ b/src/containers/home_container.js @@ -0,0 +1,24 @@ +// @flow +import React, { Component } from 'react'; +import { connect } from 'react-redux'; + +function mapStateToProps(state: Object): Object { + return {}; +} + +function mapDispatchToProps(dispatch: Function): Object { + return {}; +} + +class HomeContainer extends Component { + props: {}; + render() { + return ( +
+

HomeContainer

+
+ ); + } +} + +export default connect(mapStateToProps, mapDispatchToProps)(HomeContainer); diff --git a/src/containers/main_container.js b/src/containers/main_container.js index aaf4dda..e2b21cd 100644 --- a/src/containers/main_container.js +++ b/src/containers/main_container.js @@ -12,14 +12,14 @@ function mapDispatchToProps(dispatch: Function): Object { } class MainContainer extends Component { - - props: {}; - + props: { + children: any; + }; render() { return (
- -

HELLO WORLD

+ + {this.props.children}
); } diff --git a/src/index.js b/src/index.js index 6f20294..3b7337c 100644 --- a/src/index.js +++ b/src/index.js @@ -4,10 +4,14 @@ import { Provider } from 'react-redux'; import getMuiTheme from 'material-ui/styles/getMuiTheme'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; import injectTapEventPlugin from 'react-tap-event-plugin'; +import { Router, Route, hashHistory, IndexRoute } from 'react-router'; +import { syncHistoryWithStore } from 'react-router-redux'; import configureStore from './store/configure_store'; import MainContainer from './containers/main_container'; +import HomeContainer from './containers/home_container'; export const store = configureStore(); +const history = syncHistoryWithStore(hashHistory, store); // https://github.com/callemall/material-ui/issues/4670 injectTapEventPlugin(); @@ -15,7 +19,11 @@ injectTapEventPlugin(); ReactDOM.render( - + + + + + , document.getElementById('root'),