ReactNativeVersion
React TSX
import {ReactNativeVersion} from 'react-native';
The ReactNativeVersion API exposes the version of the resolved react-native package on JS side. Apps and libraries can use it to check compatibility or enable version-specific behavior.
note
Also, we have Platform.constants.reactNativeVersion in our public API already. However, this is the per-platform native-reported React Native version.
Example
React TSX
import {ReactNativeVersion} from 'react-native';