mui / mui/material-ui

[docs] Update all demos of the docs to include "use client" when needed

Open
#38,966 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

docs scope: all components type: enhancement
Dominant language
JavaScript
Stars
99.1k
Forks
32.5k
Avg merge
2d 17h
Merged PRs (30d)
106

Description

Summary 💡

The nominal user experience for a developer starting with Material UI is the following:

  1. Start with an example https://mui.com/material-ui/getting-started/example-projects/
Screenshot 2023-09-16 at 17 46 59

https://analytics.google.com/analytics/web/#/analysis/p353089763/edit/IBVRQAiCT2mrgZwzpg9fFQ

  1. 28% are going with Next.js App router
  2. Install it, use the first template.
  3. Go to https://mui.com/material-ui/react-select/#basic-select copy the first demo
Screenshot 2023-09-14 at 01 20 45

So I think we should update all the demos in the docs to have "use client" where needed.

Examples 🌈
Screenshot 2023-09-14 at 01 24 44 Screenshot 2023-09-14 at 01 24 48
Motivation 🔦

Better DX

Benchmarks
SCR-20240402-tgeh

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the getting-started example-projects page and the basic Select demo, then review the linked Base UI useModal example and other documentation demos for Next.js App Router compatibility. Identify demos that require client components and add the directive where needed; done means the demos work when copied into an App Router project.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, next.js, react
Domain
documentation, frontend
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.