import { addAppLifeCycle } from './appLifeCycles' ; import { SHOW , LAUNCH , ERROR , HIDE , TAB_ITEM_CLICK } from './constants' ; import type { AppConfig } from './types' ; export default function collectAppLifeCycle ( appConfig ) { const { onLaunch , onShow , onError , onHide , onTabItemClick } = appConfig . app ; addAppLifeCycle ( LAUNCH , onLaunch ) ; addAppLifeCycle ( SHOW , onShow ) ; addAppLifeCycle ( ERROR , onError ) ; addAppLifeCycle ( HIDE , onHide ) ; addAppLifeCycle ( TAB_ITEM_CLICK , onTabItemClick ) ; }