1.0.3 • Published 4 years ago
@maael/use-breakpoints v1.0.3
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 | Treat tablet as another device option |
TODOs
- Probably throttle the
handleResize
call for desktops.