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

531
Views
obtener el nombre actual del punto de interrupción de la interfaz de usuario del material

Estoy buscando una función MUI " MaterialUIGiveMeCurrentBreakPointName " que me permita realizar una acción en un componente como este:

 const currentBreakPointName = MaterialUIGiveMeCurrentBreakPointName() if(currentBreakPointName === 'myCustomBreakPointName') { // do stuff }

¿Podrías ayudarme por favor?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Actualmente no existe tal función disponible que le devuelva el nombre del punto de interrupción actual, pero puede lograrlo usando useMediaQuery hook.
Consulte : https://mui.com/material-ui/react-use-media-query/
Códigos y caja de trabajo : https://codesandbox.io/s/themehelper-demo-material-ui-forked-h2grmr?file=/demo.tsx

 const theme = useTheme(); const greaterThanMid = useMediaQuery(theme.breakpoints.up("md")); const smallToMid = useMediaQuery(theme.breakpoints.between("sm", "md")); const lessThanSmall = useMediaQuery(theme.breakpoints.down("sm")); if (greaterThanMid) { console.log("Greater than mid"); } else if (smallToMid) { console.log("Between small to mid"); } else if (lessThanSmall) { console.log("Less than small"); }

ingrese la descripción de la imagen aquí

about 4 years ago · Juan Pablo Isaza Report
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!