Skip to content

[internal] Remove unneeded use-clients#40663

Merged
mj12albert merged 2 commits intomui:masterfrom
oliviertassinari:remove-use-clients
Jan 23, 2024
Merged

[internal] Remove unneeded use-clients#40663
mj12albert merged 2 commits intomui:masterfrom
oliviertassinari:remove-use-clients

Conversation

@oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Jan 18, 2024

I'm randomly removing a few of what I believe are harmful "use client" from our source to prove my point in #42750. It's best to apply "use client" as late as possible in the import path because this allows to export of more modules that can be in the server bundle or client bundle interchangeably.

My idea is that if this goes smoothly in production after a couple of weeks, we can go all-in.

@oliviertassinari oliviertassinari added the internal Behind-the-scenes enhancement. Formerly called “core”. label Jan 18, 2024
@mui-bot
Copy link

mui-bot commented Jan 18, 2024

Netlify deploy preview

https://deploy-preview-40663--material-ui.netlify.app/

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against 9f976ac

@mj12albert mj12albert merged commit 835be7c into mui:master Jan 23, 2024
@oliviertassinari oliviertassinari deleted the remove-use-clients branch January 24, 2024 00:09
@oliviertassinari
Copy link
Member Author

oliviertassinari commented Jan 24, 2024

As a side note, I pushed 9f976ac as I needed to do the same change locally to try to make @mui/system/styled work with RSC (emotion-js/emotion#2978 (comment)).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Behind-the-scenes enhancement. Formerly called “core”. nextjs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants