At the moment, we can do useBreakpoint('md lg'). Instead we should support useBreakpoint(['md', 'lg'])
It would be a bit more performant as we wouldn't have to do the split every time
The issue with using an array is that it'd bust the react cache at each re-render when used in an inline way
|
const mediaQuery = React.useMemo(() => toMediaQuery(on), [toMediaQuery, on]); |
At the moment, we can do
useBreakpoint('md lg'). Instead we should supportuseBreakpoint(['md', 'lg'])It would be a bit more performant as we wouldn't have to do the split every time
The issue with using an array is that it'd bust the react cache at each re-render when used in an inline way
react-responsive/packages/react-responsive/src/useBreakpoint.ts
Line 13 in c624933