Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

123
Views
Detect current screen breakpoint

I am using Material UI to build my user interface for the web. I have a question regarding material UI if it provides a way to detect the current screen resolution breakpoint, ex: [xs, sm, md, lg, xl] or [0px, 600px, 900px, 1200px, 1536px] in a way that I can read it.

For instance, I wanted to use the useEffect() for cleaning a state in my component, but I needed that to be when the component hides because of a screen resolution change, so maybe I can do it like:

useEffect(()=> setMenuList(null), [mui.currentScreenResolution] )

In other words, in case the current screen breakpoints changed from 'xs' to 'md', I want this useEffect hook to run.

Does MUI provide a way to read the currently used breakpoint by the app?

Update: Just to confirm my question; I don't want to detect every time the window size of the browser changes, I only want to detect when the screen resolution changes from one of the predefined screen resolution breakpoints by mui from one to another (ex: xs → md).

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!