Last active
January 4, 2017 02:25
-
-
Save iddan/ab14ecfc60b11bb0f3087d0c5bbf9bb8 to your computer and use it in GitHub Desktop.
Simple complex React App Example
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
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import { Provider } from 'react-redux'; | |
import store from './store'; | |
import Toolbox from './toolbox'; | |
import Feed from './gallery'; | |
import Chat from './chat'; | |
function App () { | |
return ( | |
<div> | |
<Toolbox /> | |
<Feed /> | |
<Chat /> | |
</div> | |
); | |
} | |
ReactDOM.render( | |
<Provider store={store}> | |
<App /> | |
</Provider>, | |
document.querySelector('#root') | |
); |
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
import { createStore, combineReducers } from 'redux' | |
import posts from './reducers/posts'; | |
import messages from './reducers/messages'; | |
export default createStore(combineReducers({ posts, messages })); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment