DevSettings
DevSettings
モジュールは、開発中の開発者向けの設定をカスタマイズするためのメソッドを公開します。
リファレンス
メソッド
addMenuItem()
tsx
static addMenuItem(title: string, handler: () => any);
Dev Menuにカスタムメニュー項目を追加します。
パラメータ
名前 | 型 |
---|---|
title 必須 | string |
handler 必須 | function |
使用例
tsx
DevSettings.addMenuItem('Show Secret Dev Screen', () => {
Alert.alert('Showing secret dev screen!');
});
reload()
tsx
static reload(reason?: string): void;
アプリケーションをリロードします。直接呼び出すことも、ユーザーの操作に応じて呼び出すこともできます。
使用例
tsx
<Button title="Reload" onPress={() => DevSettings.reload()} />