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

Update _document.tsx #33811

Closed
wants to merge 1 commit into from
Closed

Update _document.tsx #33811

wants to merge 1 commit into from

Conversation

Arcktosh
Copy link

@Arcktosh Arcktosh commented Aug 5, 2022

No need to import React, as it is not being used.
https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html

Signed-off-by: Ben Henning [email protected]

No need to import React, as it is not being used.
https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html

Signed-off-by: Ben Henning <[email protected]>
@mui-bot
Copy link

mui-bot commented Aug 5, 2022

No bundle size changes

Generated by 🚫 dangerJS against 91c518e

@oliviertassinari
Copy link
Member

oliviertassinari commented Aug 5, 2022

@Arcktosh Interesting, thanks for raising. Now, reading https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html, this is not a one-line change. I would be in favor of:

  1. Closing this PR. Why? While Next.js does it by default, it's not done by default until Babel v8. It's only done by default since TypeScript 4.1 but we support down to 3.5. Since there is no strong downsides to importing React, we can wait.
  2. Opening a new issue to keep track of the opportunity, so we eventually do it, it sounds like a DX improvement.
    Maybe for MUI Core v6 [discussion] Preparing v6 #30660? :D
  3. Once we resume the work on this, run the codemod to update all the codebase and update the eslint rules.

@oliviertassinari oliviertassinari mentioned this pull request Aug 5, 2022
2 tasks
@michaldudak michaldudak added the examples Relating to /examples label Oct 12, 2022
@zannager zannager requested a review from michaldudak October 26, 2022 07:38
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
examples Relating to /examples PR: out-of-date The pull request has merge conflicts and can't be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants