Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added example: with-typestyle #4926

Merged
merged 2 commits into from
Aug 9, 2018
Merged

Conversation

sahalsajjad
Copy link
Contributor

Added usage example for typestyle


export default class MyDocument extends Document {
static getInitialProps ({ renderPage }) {
const page = renderPage(App => props => ReactDOMServer.renderToString(<App {...props} />))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems really slow, you're rendering the whole tree 2 times this way.

@sahalsajjad
Copy link
Contributor Author

@timneutkens Thanks for the catch! Fixed it. Check it now. 👍

Copy link
Member

@timneutkens timneutkens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! I thought that would work 👍🏻

@timneutkens timneutkens merged commit 136585e into vercel:canary Aug 9, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Aug 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants