QApp 是一个APP相关功能的模块。目前包含功能:APP 重启。
API兼容性: QRN:v8.0.10 iOS:80011358 Android:60001689
import { QApp } from 'qunar-react-native';
QApp.restart()APP 重启功能。
import React from 'react';
const { Button, QApp } = require('qunar-react-native');
const MyComponent = () => {
return <View style={styles.list}>
<Button text="点击重启"
style={styles.button}
onPress={() => QApp.restart()} >
</View>;
};
export default MyComponent;