Skip to content

Commit

Permalink
Fix hardware back button event button id in docs (#7294)
Browse files Browse the repository at this point in the history
Actual buttonId for hardware back button event is `RNN.hardwareBackButton`, not `RNN.hardwareBack` :-)
  • Loading branch information
Reeywhaar authored Oct 6, 2021
1 parent 62ab69c commit eaef192
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions website/docs/docs/docs-customBackNavigation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ options: {
}
```

Once the default behaviors are disabled, RNN will emit a [navigationButtonPress](../api/events#navigationbuttonpressed-event) with the `RNN.hardwareBack` id.
Once the default behaviors are disabled, RNN will emit a [navigationButtonPress](../api/events#navigationbuttonpressed-event) with the `RNN.hardwareBackButton` id.

```js
navigationButtonPressed({ buttonId }) {
if (buttonId === 'RNN.hardwareBack') {
if (buttonId === 'RNN.hardwareBackButton') {
console.log('The hardware back button was pressed!');
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ options: {
}
```

Once the default behaviors are disabled, RNN will emit a [navigationButtonPress](../api/events#navigationbuttonpressed-event) with the `RNN.hardwareBack` id.
Once the default behaviors are disabled, RNN will emit a [navigationButtonPress](../api/events#navigationbuttonpressed-event) with the `RNN.hardwareBackButton` id.

```js
navigationButtonPressed({ buttonId }) {
if (buttonId === 'RNN.hardwareBack') {
if (buttonId === 'RNN.hardwareBackButton') {
console.log('The hardware back button was pressed!');
}
}
Expand Down

0 comments on commit eaef192

Please sign in to comment.