Last active
April 12, 2017 04:15
-
-
Save jschr/b91093ed88b30b4a5cb833ea2109f98a to your computer and use it in GitHub Desktop.
glamor mount
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 * as React from 'react' | |
import { render } from 'react-dom' | |
import { rehydrate } from 'glamor' | |
export default function () { | |
const ssr = (window as SSRWindow).ssr | |
rehydrate(ssr.cssIds) | |
// use require to ensure glamor rehydrate is called | |
// before styles are created | |
const App = require('./components/App').default | |
render(<App {...ssr.appProps} />, document.getElementById('react-root')) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment