Skip to content

Commit 9c31370

Browse files
committed
docs: update modal docs
1 parent c370e8c commit 9c31370

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

docs/modal-usage.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,11 @@ Under the hood, this `ref` is used when you imperatively call `Toast.show()` or
2525

2626
When you have a [Modal](https://reactnative.dev/docs/modal), things get different. This `Modal` component is [_above_ React's root `View`](https://stackoverflow.com/questions/39766350/bring-view-on-top-of-modal-using-zindex-style-with-react-native), so the only way to show something _on top of the modal_ is to render it inside the `Modal` itself.
2727

28-
> Same behavior when using [react-native-modal](https://github.com/react-native-modal/react-native-modal) or a [NativeStackNavigator](https://reactnavigation.org/docs/native-stack-navigator#presentation) with `presentation: 'modal'`.
29-
3028
This means **you need a new instance** of `<Toast />` rendered inside your `Modal`.
3129

32-
The `ref` will still be tracked automatically, but there's one more thing that needs to be done for this to work properly. **You need to specify how _nested_ is your new `<Toast />` instance**.
30+
> Same behavior when using [react-native-modal](https://github.com/react-native-modal/react-native-modal) or a [NativeStackNavigator](https://reactnavigation.org/docs/native-stack-navigator#presentation) with `presentation: 'modal'`
3331
34-
This is done via the `nestingLevel` prop.
32+
The `ref` will still be tracked automatically, but there's one more thing that needs to be done for this to work properly. **You need to specify how _nested_ is your new `<Toast />` instance**: this is done via the `nestingLevel` prop.
3533

3634
By default `nestingLevel` is `0` - this is the _root level_ (the `<Toast />` that is rendered in your App's entry point).
3735

0 commit comments

Comments
 (0)