Skip to main content
Version: Next

Taro.onAppHide(callback)

Listens on the event that Mini Program is switched to background. The callback timing for this event is consistent with that of App.onHide.

Reference

Type

(callback: (res: CallbackResult) => void) => void

Parameters

PropertyTypeDescription
callback(res: CallbackResult) => voidThe callback function for the event that Mini Program is switched to background.

API Support

APIWeChat Mini-ProgramH5React Native
Taro.onAppHide✔️