You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a handler to AppState changes by listening to the `change` event type and providing the handler
165
164
166
-
TODO: now that AppState is a subclass of NativeEventEmitter, we could deprecate `addEventListener` and `removeEventListener` and use `addListener` and `listener.remove()` directly. That will be a breaking change though, as both the method and event names are different (addListener events are currently required to be globally unique).
167
-
168
165
---
169
166
170
167
### `removeEventListener()`
@@ -173,7 +170,7 @@ TODO: now that AppState is a subclass of NativeEventEmitter, we could deprecate
173
170
removeEventListener(type, handler);
174
171
```
175
172
176
-
Remove a handler by passing the `change`event type and the handler
173
+
> **Deprecated.** Use the `remove()` method on the event subscription returned by [`addEventListener()`](#addeventlistener).
0 commit comments