Вот строка кода, которая запрещает использование devSettings в prod
import NativeDevSettings from '../NativeModules/specs/NativeDevSettings';
import NativeEventEmitter from '../EventEmitter/NativeEventEmitter';
class DevSettings extends NativeEventEmitter {
...
reload(reason: string) {
if (typeof NativeDevSettings.reloadWithReason === 'function') {
NativeDevSettings.reloadWithReason(reason || 'Uncategorized from JS');
} else {
NativeDevSettings.reload();
}
}
...
}
// Avoid including the full `NativeDevSettings` class in prod.
class NoopDevSettings {
addMenuItem(title: string, handler: () => mixed) {}
reload() {}
}
module.exports = __DEV__ ? new DevSettings() : new NoopDevSettings();
из Библиотеки / Утилиты / DevSettings