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
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 timeThe issue with using an array is that it'd bust the react cache at each re-render when used in an inline way
https://github.com/bloczjs/react-responsive/blob/c6249332483d9b53bdf17cb8bd3072765a91002e/packages/react-responsive/src/useBreakpoint.ts#L13