This is more a question than a issue, but I still post it here as I think this could lead to a pull request on the next.js example.
Next.js v9 is out with an automatic prerendering feature. It can only work if we don't use getInitialProps static function, but this seems to be required to render Material-UI server side. Is there a solution about it?
Next.js automatically determines that a page is static (can be prerendered) if it has no has blocking data requirements.
https://nextjs.org/docs#automatic-prerendering
@damien-monni This happens at the page level, not the _document.js level. Our demos should be good:

@timneutkens I can't find this pages vs _documents.js distinction documented, maybe it's worth adding somewhere.
Interesting, I guess it is coming from something else in my app, probably apollo. I'll check it deeper. Thank you!
Cool, I will assume that the problem is outside of our control. Let us know how your investigation is going. It might help someone else in the futur :).
Pretty sure it's because of Apollo indeed.
oliviertassinari
The example provided works well thank you. I am curious if the behavior of _document could be placed in a custom server ? Similar to the generic SSR docs on material ui.
@jmayergit I guess it would be possible?
Probably not a good idea, in general with Next.js 9 we don't recommend people to start with a custom server and it's reserved for very advanced edge cases.
Hey @oliviertassinari @timneutkens just a random fella here that spent almost 1 hour looking how to implement this without using getInitialProps. And now I discover that since it's on _document it doesn't break SSG 馃檲
Do you think we can put this in the material-ui + next.js documentation?
@sospedra I'm not sure how we could have best answered your concern. Any specific diff suggestions?
Sure, I'll just submit a PR ;)
Most helpful comment
https://nextjs.org/docs#automatic-prerendering
@damien-monni This happens at the page level, not the _document.js level. Our demos should be good:
@timneutkens I can't find this pages vs _documents.js distinction documented, maybe it's worth adding somewhere.