Created
November 1, 2018 16:25
-
-
Save themgoncalves/168a9e89f4f04fcd151ec6ec96a07258 to your computer and use it in GitHub Desktop.
React SSR Client set-up
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
| import React from 'react'; | |
| import ReactDOM from 'react-dom'; | |
| import Loadable from 'react-loadable'; | |
| import App from './components/App'; | |
| window.onload = () => { | |
| Loadable.preloadReady().then(() => { | |
| ReactDOM.hydrate(<App />, document.getElementById('app')); | |
| }); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment