-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
Improve NextJS example with new _app.js #11209
Comments
@growak Thanks for the heads-up. Indeed, it's documented in https://github.com/zeit/next.js#custom-app. |
@oliviertassinari thank you for the quick feedback. |
Played around with Background/reasoning: I had an inkling that |
I ran into problems here as well. Specifically, when using _app.js to create a persistent layout. My layout contains its own set of material-ui components that require theme and custom jss. The current example wraps individual pages with
|
Hi there. Is there any update on this? |
@mheras I believe you can't use the |
An example of how to wrap the Component in a persitent layout is still missing. My attempts to create a common Material-UI layout have been unsuccessful:
Seems there needs to be a way to have persistent style elements that map to the common header, footer, etc. |
@landerton Our next.js demo now demonstrates how to do that. The "persitent layout" in the demo is simply the |
Ahhh okay. Thank you. Got it working by wrapping my persistent layout style classes with |
NextJs has released a canary version providing a new way to extend the main application (_app.js). Material UI settings should be configured in this file with a higher order component.
Here is a Redux integration example using the _app.js file.
Your Environment
The text was updated successfully, but these errors were encountered: