本文整理匯總了TypeScript中react-native-navigation.Navigation.events方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Navigation.events方法的具體用法?TypeScript Navigation.events怎麽用?TypeScript Navigation.events使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類react-native-navigation.Navigation
的用法示例。
在下文中一共展示了Navigation.events方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: require
YellowBox.ignoreWarnings([
'Required dispatch_sync to load constants for CodePush. This may lead to deadlocks',
'RCTBridge required dispatch_sync to load CodePush. This may lead to deadlocks',
]);
// Include devtools
if (__DEV__) {
const { connectToDevTools } = require('mobx-devtools/lib/mobxDevtoolsBackend.js');
connectToDevTools({ host: 'localhost', port: '8098' });
// XMLHttpRequest = (global as any).originalXMLHttpRequest || (global as any).XMLHttpRequest;
}
// Enable LayoutAnimation on android
if (Platform.OS === 'android') {
UIManager.setLayoutAnimationEnabledExperimental(true);
}
// Register screens
Screens.forEach((ScreenComponent, key) =>
Navigation.registerComponent(key, () => ScreenComponent));
// Start application
Navigation.events().registerAppLaunchedListener(() => {
// Hydrate store and start app
Store.hydrate()
.then(theme.update)
.then(startApp);
});