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
.
Type
(callback: (res: CallbackResult) => void) => void
Parameters
Property | Type | Description |
---|---|---|
callback | (res: CallbackResult) => void | The callback function for the event that Mini Program is switched to background. |
API Support
API | WeChat Mini-Program | H5 | React Native |
---|---|---|---|
Taro.onAppHide | ✔️ |