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