Skip to content

Instantly share code, notes, and snippets.

@drenther
Created June 17, 2018 19:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drenther/60871e8742838cea1935f2e5489e465b to your computer and use it in GitHub Desktop.
Save drenther/60871e8742838cea1935f2e5489e465b to your computer and use it in GitHub Desktop.
index.js for client of react-ssr
import React from 'react';
import { hydrate } from 'react-dom';
import { BrowserRouter } from 'react-router-dom';
import App from '../shared/App';
hydrate(
<BrowserRouter>
<App />
</BrowserRouter>,
document.querySelector('#app')
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment