AppRegistry 是運行所有 React Native 應(yīng)用程序的 JS 入口點。應(yīng)用程序跟組件需要通過 AppRegistry.registerComponent 來注冊它們自身,然后本地系統(tǒng)就可以加載應(yīng)用程序的包,再然后當 AppRegistry.runApplication準備就緒后就可以真正的運行該應(yīng)用程序了。
AppRegistry 在 require 序列里是 required,確保在其他模塊被需求之前 JS 執(zhí)行環(huán)境已經(jīng)被 required。
static **registerConfig**(config: Array<AppConfig>)
static **registerComponent**(appKey: string, getComponentFunc: Function)
static **registerRunnable**(appKey: string, func: Function)
static **runApplication**(appKey: string, appParameters: any)