useBreakpoints
Example
const device = useBreakpoints({ treatTabletAs: "desktop" });
Options
Option | Type | Required | Description |
---|---|---|---|
breakpoints |
Record<BreakpointDeviceOption, number> |
N | Set of breakpoints and values |
treatTabletAs |
`'mobile' | 'desktop'` | N |
TODOs
- [ ] Probably throttle the
handleResize
call for desktops.