Created
February 20, 2017 15:23
-
-
Save diegocasmo/be625f6dd4a12e2ed1eb3f713512ed96 to your computer and use it in GitHub Desktop.
This file starts the application like you would normally do in the client side. It is wrapped by the Provider component and passes to it the appData received from the index.ejs file.
This file contains hidden or 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
window['MY_APP'] = window['MY_APP'] || (() => { | |
return { | |
initialize: (config) => { | |
ReactDOM.render( | |
<Provider appData={config.appData}> | |
<Router history={browserHistory}> | |
{ routes } | |
</Router> | |
</Provider>, | |
document.getElementById('root') | |
); | |
} | |
}; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment