Skip to content

[docs] V3 Migration Guide: Include notes about withMobileDialog vs useMediaQuery #23601

Closed
@onebree

Description

@onebree

I followed the upgrade guide from v3 to v4 last week:

https://material-ui.com/guides/migration-v3/

There was no mention of withMobileDialog being deprecated. Looks like it's mentioned in #22074, but it looks to have been deprecated after v3. Searching for the function yields no results.

I found out about useMediaQuery after reading thru related react-testing-library issues, and poking around the MUI docs themselves. Seems like it's the preferred way to handle responsive dialogs. But again, not mentioned in the upgrade guide.

https://material-ui.com/components/dialogs/#responsive-full-screen

I did find that, if you wanted to keep withMobileDiaglog in your app, you just need to adjust your test setup like so:

https://material-ui.com/components/use-media-query/#testing

I don't mind opening a pull request to update the guide, but am unsure of desired format. Seems like the guide is pretty minimal in descriptions, showing upgrade strategies (like for component refs) in other pages.

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions