1.0.3 • Published 6 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
handleResizecall for desktops.