$ npm install react-native-screen-recorder-detect --save
$ react-native link react-native-screen-recorder-detect
import ScreenRecorderDetect from 'react-native-screen-recorder-detect';
<ScreenDetect
Detect={(val) => {
// val => YES|NO
if (val == "YES") {
setModalVisible(true);
} else {
setModalVisible(false);
}
}}
/>