當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript react-native.AppRegistry類代碼示例

本文整理匯總了TypeScript中react-native.AppRegistry的典型用法代碼示例。如果您正苦於以下問題:TypeScript AppRegistry類的具體用法?TypeScript AppRegistry怎麽用?TypeScript AppRegistry使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了AppRegistry類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: registerComponent

 registerComponent(componentName: string, getComponentClassFunc: ComponentProvider, ReduxProvider?: any, reduxStore?: any): ComponentProvider {
   const NavigationComponent = () => {
     return this.ComponentWrapperClass.wrap(componentName, getComponentClassFunc, this.store, this.componentEventsObserver, ReduxProvider, reduxStore)
   };
   this.store.setComponentClassForName(componentName, NavigationComponent);
   AppRegistry.registerComponent(componentName, NavigationComponent);
   return NavigationComponent;
 }
開發者ID:Fiv38,項目名稱:react-native-navigation,代碼行數:8,代碼來源:ComponentRegistry.ts

示例2: registerComponent

 registerComponent(appKey: string, getComponentFunc: ComponentProvider) {
   AppRegistry.registerComponent(appKey, getComponentFunc);
 }
開發者ID:wix,項目名稱:react-native-navigation,代碼行數:3,代碼來源:AppRegistryService.ts

示例3: start

    public async start(): Promise<void> {
        let applicationState = await this.onInitialize();
        let applicationComponent = await this.onGetRootComponent(applicationState);

        AppRegistry.registerComponent(this._appKey, () => applicationComponent);
    }
開發者ID:ncorefx,項目名稱:ncorefx,代碼行數:6,代碼來源:Application.ts

示例4:

import App from './App';
import React, { Component } from 'react';
import { AppRegistry } from 'react-native';

// register the app
AppRegistry.registerComponent('App', () => App);

AppRegistry.runApplication('App', {
    initialProps: {},
    rootTag: document.getElementById('react-app')
});
開發者ID:rhildred,項目名稱:tsmagic8ball,代碼行數:11,代碼來源:index.web.ts

示例5:

import { AppRegistry } from 'react-native'
import App from '../components/App'

AppRegistry.registerComponent('PlayProject', () => App)
開發者ID:duataud,項目名稱:PlayApp,代碼行數:4,代碼來源:index.android.ts


注:本文中的react-native.AppRegistry類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。