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

[useMediaQuery] Remove unstable prefix #14593

Merged
merged 3 commits into from
Mar 8, 2019
Merged

Conversation

alirni
Copy link
Contributor

@alirni alirni commented Feb 20, 2019

The "useTheme" was mistakenly imported

Breaking changes

-import { unstable_useMediaQuery as useMediaQuery } from '@material-ui/core/useMediaQuery';
+import useMediaQuery from '@material-ui/core/useMediaQuery';

@eps1lon eps1lon added the docs Improvements or additions to the documentation label Feb 20, 2019
@eps1lon
Copy link
Member

eps1lon commented Feb 20, 2019

This hook is not part of @material-ui/core but @material-ui/styles. Why do you think this import is wrong?

@oliviertassinari oliviertassinari changed the base branch from master to next February 20, 2019 10:15
@oliviertassinari oliviertassinari changed the title fix use-media-query.md [docs] Take advantage of the default theme Feb 20, 2019
@oliviertassinari oliviertassinari added the on hold There is a blocker, we need to wait label Feb 20, 2019
@oliviertassinari
Copy link
Member

@alirni The suggested change is wrong as we are speaking. The only useTheme() hook we have comes from @material-ui/style.

Now, I think that there is an important flaw here, this module doesn't have any default theme. I'm working on re-exporting #14560 the @material-ui/style modules in @material-ui/core/style with the default Material-UI theme. We should be able to merge your pull request once the effort is completed.

@alirni
Copy link
Contributor Author

alirni commented Feb 21, 2019

@oliviertassinari
In my project, useTheme() does not exist in this path @material-ui/style.
Maybe you made a mistake in the @material-ui/style output. However, using the useTheme() with this path @material-ui/core/style is not a problem.

@oliviertassinari
Copy link
Member

oliviertassinari commented Feb 21, 2019

@oliviertassinari oliviertassinari self-assigned this Feb 22, 2019
@oliviertassinari oliviertassinari changed the title [docs] Take advantage of the default theme [useMediaQuery] Remove unstable prefix Mar 7, 2019
alirni and others added 2 commits March 7, 2019 23:20
@oliviertassinari oliviertassinari added new feature New feature or request and removed on hold There is a blocker, we need to wait docs Improvements or additions to the documentation labels Mar 7, 2019
@mui-pr-bot
Copy link

mui-pr-bot commented Mar 7, 2019

Details of bundle changes.

Comparing: 099bc5e...6ee9e69

bundle parsed diff gzip diff prev parsed current parsed prev gzip current gzip
@material-ui/core -0.00% +0.06% 🔺 362,378 362,374 92,048 92,107
@material-ui/core/Paper +0.15% 🔺 +0.07% 🔺 68,773 68,878 20,155 20,170
@material-ui/core/Paper.esm +0.07% 🔺 -0.01% 63,294 63,340 19,274 19,272
@material-ui/core/Popper +0.01% 🔺 +0.15% 🔺 30,458 30,460 10,557 10,573
@material-ui/core/styles/createMuiTheme 0.00% +0.05% 🔺 17,284 17,284 5,697 5,700
@material-ui/core/useMediaQuery -0.60% -1.33% 2,486 2,471 1,049 1,035
@material-ui/lab +0.08% 🔺 +0.05% 🔺 170,613 170,747 50,038 50,065
@material-ui/styles +0.18% 🔺 +0.12% 🔺 57,118 57,220 16,253 16,273
@material-ui/system 0.00% -0.11% 17,041 17,041 4,498 4,493
Button +0.05% 🔺 +0.09% 🔺 91,106 91,152 26,915 26,939
Modal +0.05% 🔺 +0.03% 🔺 90,214 90,261 26,715 26,724
colorManipulator 0.00% 0.00% 3,232 3,232 1,298 1,298
docs.landing 0.00% 0.00% 51,908 51,908 11,302 11,302
docs.main +0.02% 🔺 +0.01% 🔺 646,179 646,311 200,782 200,799
packages/material-ui/build/umd/material-ui.production.min.js -0.05% -0.06% 310,946 310,796 85,146 85,092

Generated by 🚫 dangerJS against 6ee9e69

@oliviertassinari
Copy link
Member

@alirni Thanks for raising the concern.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants