DEV Community

Dani Akash πŸ§ͺπŸ’₯
Dani Akash πŸ§ͺπŸ’₯

Posted on

React Native Responsive Dimensions - Updated with more responsiveness for foldable devices

React Native Responsive Dimensions have been updated to version 3.1.0 with full typescript support & a whole bunch of new utilities quickly check out the new release at github

First published three years ago as a simple utility to resize some views based on the device's screen size, responsive dimensions quickly became one of the favourite tools for my colleagues and many react native developers. I was updating it once a year with a few new things like the responsive hooks last year. But this update is quite important!

I recently worked with Rachel Nabors on React Native Component Docs Drive where while documenting the actual react native's inbuilt dimensions module, I realized Responsive Dimensions has a great potential to simplify application development for foldables and react-native-web apps.

With this new update, Responsive Dimensions now have

  • Separate utilities for Responsive "window" & "screen" sizes (screen sizes will be useful while working with foldables)
  • New responsive screen size hooks
  • useDimensionsChange hook to let your application respond to dimension changes

See the release notes for a full list of changes and also checkout the example projects at Snack & CodeSandbox

Do let me know if you have any feature requests or feedbacks οΉ£ always happy to help πŸ˜πŸ‘

Top comments (0)