react-native-size-matters
react-native-size-matters copied to clipboard
Warning: Error: Exception in HostFunction: Loss of precision during arithmetic conversion: (long)
There is an issue when using the library with the latest version of React Native (currently 0.76.3), "react-native-screens": "^4.3.0" and last version @react-navigation
When building the Android version, an error occurs:
Warning: Error: Exception in HostFunction: Loss of precision during arithmetic conversion: (long)
The problem disappears if you set integer values in the header sizes:
<Stack.Navigator
screenOptions={{
headerTitleStyle: {
fontSize: ms(16) <-- use Math.round(ms(16)) for example
}
}}
>