I am currently working on adding support for Sentry.io in my react-native app. I use react-native-sentry package and there is one requirement: the package should only be imported if certain constant is set to true, for example SHOULD_USE_SENTRY. All sentry configuration is stored in a separate file, which also exposes 2 methods: setupSentry and captureException which are used in the root of the app in the componentDidMount and componentDidCatch respectively. How can I dynamically load those methods in the root component, so that when the value of SHOULD_USE_SENTRY is false I won't get errors thrown after calling my methods? I hope I described my issue clear enough.