You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The package was renamed @blocz/react-responsive instead of react-only
rename useOnly to useBreakpoint and useQuery to useMediaQueryBREAKING CHANGE
Those were renamed for 2 reasons:
useOnly isn’t really explicit
useQuery can be confused with react-query’s or apollo’s useQuery hooks
useBreakpoint and useMediaQuery stop returning undefined during the initialization and if the media query is invalid. Instead it will directly use the correct value, and if the media query is invalid, it’ll return false. BREAKING CHANGE
Bump peerDependencies to allow for react 17
Drop support for node 10
Remove prop strictBREAKING CHANGE:
This feature was initially introduced to avoid collision between mdUp and smDown for instance. But since we avoid the overlapping of breakpoints in the v1.0.1 and as this is customizable, this prop doesn't make sense anymore.
This prop relied on calc(% + 1px) and calc(% - 1px) which has 2 issues:
difficult to be compatible with SSR as for instance css-mediaquery crashes when we use calc() (see issue),
1px is really arbitrary and not customizable so anyway if someone wanted to change that, they had to use custom breakpoints.
Fix only and matchMedia props on DOM elements for the Match component
Inject MatchChildProps in HTMLAttributes from the global namespace React