@maael/use-breakpoints
v1.0.3
Published
A collection of React components for my projects.
Downloads
15
Readme
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.