High-order Component To Map Window Sizes To Props

Description:

React Sizes is a high-order component with a high performance that transforms window sizes (width and height) into props. You can check inside your component, for example, if user’s window is less than 480 pixels of width, and add a custom content.

It can be very powerful for when you need to display different content for mobile and desktop. But it’s not limited to this case. Just use that at your needs.

Installation:

# Yarn
yarn add react-sizes

# NPM
$ npm install react-sizes

Preview:

High-order Component To Map Window Sizes To Props

Add Comment