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

[examples] Improve integration examples with Next.js #27331

Merged
merged 12 commits into from
Jul 28, 2021

Conversation

Harshita-Kanal
Copy link
Contributor

@Harshita-Kanal Harshita-Kanal commented Jul 16, 2021

@mui-pr-bot
Copy link

mui-pr-bot commented Jul 16, 2021

No bundle size changes (experimental)

Generated by 🚫 dangerJS against 730f85b

Copy link
Member

@mnajdova mnajdova left a comment

Choose a reason for hiding this comment

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

Looks almost good! :)

examples/nextjs/pages/_app.js Outdated Show resolved Hide resolved
examples/nextjs/pages/_app.js Outdated Show resolved Hide resolved
examples/nextjs/src/createEmotionCache.js Outdated Show resolved Hide resolved
@mnajdova
Copy link
Member

@Harshita-Kanal I've polished the changes and verified that they fix both issues linked in the PR description. Let's update the nextjs-with-typescript example if we want to close the issues.

I will apply the changes on our docs too in a separate PR.

@Harshita-Kanal
Copy link
Contributor Author

Thanks :) I will update the nextjs-with-typescript example as well

@mnajdova
Copy link
Member

@mui-org/core I want to give a shout out to @Harshita-Kanal - she was one of the mentors on the Open Source Day and did a great job! 🙌

examples/nextjs/pages/_document.js Outdated Show resolved Hide resolved
@oliviertassinari oliviertassinari added the docs Improvements or additions to the documentation label Jul 24, 2021
@oliviertassinari
Copy link
Member

I have rebased and push a couple of changes:

  1. Fix prop-type warning raised by Sebastian
  2. Remove unnecessary CacheProvider in _document
  3. Roll out the new approach to the Next.js TypeScript example and more importantly, the docs.

@oliviertassinari oliviertassinari changed the title [examples] Fix integration example with nextjs [examples] Fix integration example with Next.js Jul 24, 2021
@oliviertassinari oliviertassinari changed the title [examples] Fix integration example with Next.js [examples] Improve integration example with Next.js Jul 24, 2021
Copy link
Member

@mnajdova mnajdova left a comment

Choose a reason for hiding this comment

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

Something is off with the docs:

nextjs-docs

@oliviertassinari
Copy link
Member

oliviertassinari commented Jul 27, 2021

Something is off with the docs:

@mnajdova Oops, I didn't test it, my bad, I got overconfident 😅.

@oliviertassinari oliviertassinari changed the title [examples] Improve integration example with Next.js [examples] Improve integration examples with Next.js Jul 27, 2021
Copy link
Member

@mnajdova mnajdova left a comment

Choose a reason for hiding this comment

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

Looks good! Can't spot any issues.

@mnajdova mnajdova merged commit 75f2707 into mui:next Jul 28, 2021
@mnajdova
Copy link
Member

mnajdova commented Aug 13, 2021

Please fix an example, it doesn't work
https://codesandbox.io/s/github/mui-org/material-ui/tree/next/examples/nextjs-with-typescript

@egorguscha Did you try to load it locally? Looks like an issue on codeasndbox. Other examples can't be loaded too.

@oliviertassinari
Copy link
Member

oliviertassinari commented Aug 13, 2021

Forking the codesandbox seems to work.


Next.js has links to StackBlitz https://github.com/vercel/next.js/tree/canary/examples/custom-server-express#preview, it was added in vercel/next.js#25853.

It seems to work with us https://stackblitz.com/github/mui-org/material-ui/tree/next/examples/nextjs-with-typescript. The advantage is the backend runs inside a web-worker, not a remote server, it's more reliable. @sulco maybe it's something you would be interested in adding?

@egorguscha
Copy link

egorguscha commented Aug 17, 2021

Please fix an example, it doesn't work
https://codesandbox.io/s/github/mui-org/material-ui/tree/next/examples/nextjs-with-typescript

@egorguscha Did you try to load it locally? Looks like an issue on codeasndbox. Other examples can't be loaded too.

Sorry, for the late reply just need to fork it, but anyway all is right. Besides I would add example with tss-react and styled

@sulco
Copy link
Contributor

sulco commented Aug 17, 2021

I'll do that, @oliviertassinari!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation
Projects
None yet
7 participants