Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/accessibilityinfo.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ static addEventListener(
handler: (
event: AccessibilityChangeEvent | AccessibilityAnnouncementFinishedEvent,
) => void,
): EmitterSubscription;
): EventSubscription;
```

Add an event handler. Supported events:
Expand Down
2 changes: 1 addition & 1 deletion docs/appearance.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Supported values:
```tsx
static addChangeListener(
listener: (preferences: {colorScheme: 'light' | 'dark' | null}) => void,
): NativeEventSubscription;
): EventSubscription;
```

Add an event handler that is fired when appearance preferences change. On iOS and Android, the `colorScheme` value in the callback is always `'light'` or `'dark'`.
2 changes: 1 addition & 1 deletion docs/appstate.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Received when the user is not actively interacting with the app. Useful in situa
static addEventListener(
type: AppStateEvent,
listener: (state: AppStateStatus) => void,
): NativeEventSubscription;
): EventSubscription;
```

Sets up a function that will be called whenever the specified event type on AppState occurs. Valid values for `eventType` are
Expand Down
4 changes: 2 additions & 2 deletions docs/backhandler.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ const styles = StyleSheet.create({
export default App;
```

`BackHandler.addEventListener` creates an event listener & returns a `NativeEventSubscription` object which should be cleared using `NativeEventSubscription.remove` method.
`BackHandler.addEventListener` creates an event listener & returns an `EventSubscription` object which should be cleared using the `EventSubscription.remove` method.

## Usage with React Navigation

Expand All @@ -124,7 +124,7 @@ If you are using React Navigation to navigate across different screens, you can
static addEventListener(
eventName: BackPressEventName,
handler: () => boolean | null | undefined,
): NativeEventSubscription;
): EventSubscription;
```

---
Expand Down
2 changes: 1 addition & 1 deletion docs/dimensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ static addEventListener(
window,
screen,
}: DimensionsValue) => void,
): EmitterSubscription;
): EventSubscription;
```

Add an event handler. Supported events:
Expand Down
2 changes: 1 addition & 1 deletion docs/keyboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export default Example;
static addListener: (
eventType: KeyboardEventName,
listener: KeyboardEventListener,
) => EmitterSubscription;
) => EventSubscription;
```

The `addListener` function connects a JavaScript function to an identified native keyboard notification event.
Expand Down
2 changes: 1 addition & 1 deletion docs/linking.md
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ export default App;
static addEventListener(
type: 'url',
handler: (event: {url: string}) => void,
): EmitterSubscription;
): EventSubscription;
```

Add a handler to Linking changes by listening to the `url` event type and providing the handler.
Expand Down
Loading