Skip to content

Instantly share code, notes, and snippets.

@themgoncalves
Created November 1, 2018 16:25
Show Gist options
  • Save themgoncalves/168a9e89f4f04fcd151ec6ec96a07258 to your computer and use it in GitHub Desktop.
Save themgoncalves/168a9e89f4f04fcd151ec6ec96a07258 to your computer and use it in GitHub Desktop.
React SSR Client set-up
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