import { NOT_FOUND , SHARE , UNHANDLED_REJECTION } from '../constants' ; import { addAppLifeCycle } from '../appLifeCycles' ; import type { AppConfig } from '../types' ; export default function collectAppLifeCycle ( appConfig ) { const { onPageNotFound , onShareAppMessage , onUnhandledRejection } = appConfig . app ; addAppLifeCycle ( SHARE , onShareAppMessage ) ; addAppLifeCycle ( UNHANDLED_REJECTION , onUnhandledRejection ) ; addAppLifeCycle ( NOT_FOUND , onPageNotFound ) ; }