DevSettings

React 实战教程 深入学习一线大厂必备前端技能,VIP 教程限时免费领取。 立即查看 >

The DevSettings module exposes methods for customizing settings for developers in development.


文档#

方法#

addMenuItem()#

static addMenuItem(title: string, handler: function)

在开发者菜单中添加一个自定义的菜单项:

DevSettings.addMenuItem("Show Secret Dev Screen", () => {
Alert.alert("Showing secret dev screen!");
});

reload()#

static reload()

Reload the application. Can be invoked directly or on user interaction:

<Button title="Reload" onPress={() => DevSettings.reload()} />

本文档贡献者:sunnylqm(100.00%)#