bloczjs / react-responsive

🔍 <Only /> displays some contents for particular screen sizes
22 stars 0 forks source link

Rename breakpoints #62

Open Ayc0 opened 1 year ago

Ayc0 commented 1 year ago

The word breakpoint has been used from the creation of the library to be closer to what other libs are doing. But in react-responsive, those aren't breakpoints: when you mention sm, it's not a breakpoint, but a range between 2 breakpoints.

We should rename it range in the documentation, and instead of exposing useBreakpoint, we could expose useMediaRange (and keep the export useBreakpoint for now but deprecated and remove it in the next major)