Skip to content

[withWidth] Remove the API #17350

@Bouncue

Description

@Bouncue

The docs says:

withWidth()

This higher-order component will be deprecated for the useMediaQuery hook.

Will this really happen? when and in what version?

I have many class components which mean cannot use useMediaQuery hook. But I really need to keep watch on screen size changes.

Also if Material-UI decides to get rid of withWidth() then why still use it in the demo? as in Responsive Drawer

This makes me confuse unsure to decide, should I just use withWidth() in my class components or should I convert them into functional component -which means a lot of work- to use useMediaQuery.

Does Material-UI plans to drop support for the class component?

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking changeIntroduces changes that are not backward compatible.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions