'React Native normalize on rotation

On projects I've been using elements size normalisation similar to https://www.npmjs.com/package/react-native-normalize

It worked fine until we had an app with screen rotation of Galaxy Fold. The issue is when screen rotates or fold is opened or closed, screen width changes and elements look different.

Is there any way to update dimensions globally and recalculate values in stylesSheet that are dependent on screen width?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source