Q:

How to check if 3rd party library is installed in React Native

I have an app that do not published on App/Play Store and we have CodePush to release update to the app, as in the new release we have include a new react-native-image-picker library, as this 3rd party library is not able to publish via CodePush, how i can check/try..catch if the react-native-image-picker library is not installed for users that update app via CodePush? 
possible to do something like this? 
try {
  import ImagePicker from "react-native-image-picker";
} catch (error) {
  const ImagePicker = null;
}

A:

ok.  i managed to handle the checking by doing this....
const ImagePicker = NativeModules. ImagePickerManager ?  NativeModules. ImagePickerManager : null;

