-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
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
[styles][withStyles] Expect React defaultProps warning in test #42752
Merged
aarongarciah
merged 1 commit into
mui:next
from
aarongarciah:expect-react-warning-default-props
Jun 26, 2024
Merged
[styles][withStyles] Expect React defaultProps warning in test #42752
aarongarciah
merged 1 commit into
mui:next
from
aarongarciah:expect-react-warning-default-props
Jun 26, 2024
Conversation
This file contains 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
15 tasks
Netlify deploy previewhttps://deploy-preview-42752--material-ui.netlify.app/ Bundle size report |
mnajdova
approved these changes
Jun 26, 2024
13 tasks
aarongarciah
added a commit
to aarongarciah/material-ui
that referenced
this pull request
Jul 5, 2024
aarongarciah
added a commit
that referenced
this pull request
Jul 5, 2024
joserodolfofreitas
pushed a commit
to joserodolfofreitas/material-ui
that referenced
this pull request
Jul 29, 2024
This was referenced Aug 2, 2024
This was referenced Aug 2, 2024
This was referenced Aug 12, 2024
This was referenced Aug 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
package: styles
Specific to @mui/styles. Legacy package, @material-ui/styled-engine is taking over in v5.
React 19 support
PRs required to support React 19
test
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.
Context
React 18.3.0 started to Warn for deprecated
defaultProps
for function components. See https://github.com/facebook/react/blob/main/CHANGELOG.md#1830-april-25-2024. SincewithStyles
readsdefaultProps
from components, there's a couple of React component usingdefaultProps
in tests that fail because of the React warnings.This PR updates the tests to expect such React warning when running the tests with React 18.3.x
How to test
Tests should pass in CI because we still use React 18.2 by default. I tried running CI with React 18.3 but it failed.
To test it locally, you should update React to 18.3.1 and run the related tests (
pnpm tc "withStyles"
) to verify everything works as expected.