Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
static getInitialProps({ renderPage }) {
const page = renderPage()
// `css` is a string with css from both glamor and ui-box.
// No need to get the glamor css manually if you are using it elsewhere in your app.
//
// `hydrationScript` is a script you should render on the server.
// It contains a stringified version of the glamor and ui-box caches.
// Evergreen will look for that script on the client and automatically hydrate
// both glamor and ui-box.
const { css, hydrationScript } = extractStyles()
return {
...page,
css,
hydrationScript
}
}
static getInitialProps({ renderPage }) {
const page = renderPage();
const { css, hydrationScript } = extractStyles();
return {
...page,
css,
hydrationScript
};
}