1.0.3 • Published 4 years ago

@maael/use-breakpoints v1.0.3

Weekly downloads
5
License
UNLICENSED
Repository
github
Last release
4 years ago

useBreakpoints

Example

const device = useBreakpoints({ treatTabletAs: "desktop" });

Options

OptionTypeRequiredDescription
breakpointsRecord<BreakpointDeviceOption, number>NSet of breakpoints and values
treatTabletAs'mobile' | 'desktop'NTreat tablet as another device option

TODOs

  • Probably throttle the handleResize call for desktops.