-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[core] Add debug values to various hooks #19515
Conversation
@@ -201,7 +201,7 @@ export default function makeStyles(stylesOrCreator, options = {}) { | |||
classNamePrefix, | |||
}; | |||
|
|||
return (props = {}) => { | |||
const useStyles = (props = {}) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Details of bundle changes.Comparing: 1ee2a0d...70fbc15 Details of page changes
|
18a4214
to
1d1ee90
Compare
// skip | ||
// import * as React from 'react' | ||
// if (__DEV__) React.useDebugValue() | ||
ignoreWarning = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TrySound Is this expected from rollup? Feels like it should not warn here but remove the import. Or is this terser
territory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's leave this as a console.warn as opposed to throwing as a reminder that this isn't fully dce'd (Dead Code Elimination). It's only 23Bytes anyway.
816c164
to
70fbc15
Compare
useTheme
displays the themeuseMediaQuery
displays{ query: string, match: boolean }
makeStyles
now has a name and returns the class keys with their name i.e.Record<string, string>
useFocusVisible
returns the focus-visible stateShould be visible as soon as facebook/react#18070 is released.