mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-05-25 15:42:24 +00:00
[fix] Dimensions addEventListener returns subscription object
Fix #2130 Close #2131
This commit is contained in:
committed by
Nicolas Gallagher
parent
68e878be8f
commit
4aba2bdcf4
@@ -33,7 +33,7 @@ Get a dimension (e.g., window or screen).
|
||||
This should only be called server-side with an estimate for initial dimensions to be used when pre-rendering pages on the server.
|
||||
{% endcall %}
|
||||
|
||||
{% call macro.prop('addEventListener', '(type: ?string, listener: (dimensions) => void) => void') %}
|
||||
{% call macro.prop('addEventListener', '(type: ?string, listener: (dimensions) => void) => ?EmitterSubscription') %}
|
||||
Add a listener to `Dimensions` changes. Listen to the `"change"` event type. The handler is called with the dimensions state.
|
||||
{% endcall %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user