-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
[blog] Add blog post about support for Next.js App Router #37929
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
450eb97
initializing
mapache-salvaje 0bff05b
first draft text
mapache-salvaje 3e79d4d
links
mapache-salvaje 8feaffd
add images
danilo-leal 18e9229
Update docs/pages/blog/mui-next-js-app-router.md
mapache-salvaje 65f572e
progress
mapache-salvaje 2dc8cdc
example links
mapache-salvaje 342e76e
guide links
mapache-salvaje 697b03b
rsc ssr callout
mapache-salvaje 414e041
prettier
mapache-salvaje ee02abd
Core
mapache-salvaje 813096a
css in js
mapache-salvaje df03ac4
very soon
mapache-salvaje adc40ce
active voice
mapache-salvaje b1866f4
Update docs/pages/blog/mui-next-js-app-router.md
mapache-salvaje File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import * as React from 'react'; | ||
import TopLayoutBlog from 'docs/src/modules/components/TopLayoutBlog'; | ||
import { docs } from './mui-next-js-app-router.md?@mui/markdown'; | ||
|
||
export default function Page() { | ||
return <TopLayoutBlog docs={docs} />; | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
title: MUI Core libraries support the Next.js App Router | ||
description: Material UI, Base UI, and Joy UI are now compatible with the App Router as Client Components. Get started using the latest Next.js features with MUI! | ||
date: 2023-07-18T00:00:00.000Z | ||
authors: ['samuelsycamore'] | ||
card: true | ||
tags: ['News'] | ||
--- | ||
|
||
With v5.14.0, MUI's core component libraries—Material UI, Base UI, and Joy UI—are now compatible with the Next.js App Router. 🚀 | ||
|
||
<img alt="MUI and Next.js logos" src="/static/blog/mui-next-js-app-router/logos.png" loading="lazy" width="2076" height="900" /> | ||
|
||
## Adapting to the new paradigm | ||
|
||
React 18 introduced the concept of React Server Components, and Next.js 13 gave us the first framework implementation of RSCs with the App Router. | ||
While these two changes have caused major waves among the React community, it's clear that this is the path forward, and it's our responsibility as library maintainers to adapt to the new paradigm. | ||
|
||
As a first step towards this goal, we've updated all MUI Core components to ship with the `"use client"` directive, to let your apps know that these are Client Components since Server Components are now the default. | ||
|
||
Additionally, we've created guides to walk you through setting up an app using the Next.js App Router with each of the Core libraries: | ||
|
||
- [Material UI setup](#) | ||
- [Base UI setup](#) | ||
- [Joy UI setup](#) | ||
|
||
<img alt="Screenshot of the Material UI documentation" src="/static/blog/mui-next-js-app-router/docs.png" loading="lazy" width="2400" height="1394" style="margin-bottom:24px;" /> | ||
|
||
We also have example repos for each, with everything already set up for you: | ||
|
||
- [Material UI example](#) | ||
- [Base UI with Tailwind CSS example](#) | ||
- [Joy UI example](#) | ||
|
||
## What comes next | ||
|
||
In the world of Server Components, "traditional" CSS-in-JS poses a serious challenge that may require us to move beyond Emotion, which is the default styling solution for Material UI and Joy UI in v5. | ||
We're currently exploring ways to offer our own zero-runtime CSS-in-JSS solution, similar to what Chakra UI now offers with Panda CSS. | ||
mapache-salvaje marked this conversation as resolved.
Show resolved
Hide resolved
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.