Material UI has a handy function of checking for breakpoints for example.
const matchesSM = useMediaQuery(theme.breakpoints.down("sm"));
So if the screen size goes below sm then matchesSM
becomes true.
Does Ant Design have a similar feature?
Yes. It's called useBreakpoint
.
Here's the doc: https://ant.design/components/grid/#components-grid-demo-useBreakpoint