When using react-native-toast-message in an Expo project with SafeAreaProvider from react-native-safe-area-context and @react-navigation/stack, toasts are not visible on iOS if the stack screen has a header. The toast appears to be rendered behind the navigation header.
Steps to reproduce
Wrap your app in SafeAreaProvider
Use a stack navigator from @react-navigation/stack with the default header shown
Render at the root level
Trigger a toast from any screen
Observe on iOS — the toast does not appear or is hidden behind the header
Expected behavior
Toast should appear above all content, including headers, when rendered at the top of the component tree.
Screenshots
If needed, include screenshots or a video of the behavior.
Code sample:
// App.tsx
// AuthNavigation.tsx
<Stack.Navigator>
<Stack.Screen name="Auth" component={SignInScreen} />
</Stack.Navigator>
Environment
OS: iOS 18.5
Expo SDK: 53
react-native: 0.79.5
react-native-toast-message: 2.3.3
react-native-safe-area-context: 5.4.0
@react-navigation/stack: 7.4.2
Additional context
This only occurs on iOS. Manually setting topOffset on the component doesn’t resolve the issue consistently. It appears to be a z-index/stacking issue when SafeArea and Stack headers are both involved.
When using react-native-toast-message in an Expo project with SafeAreaProvider from react-native-safe-area-context and @react-navigation/stack, toasts are not visible on iOS if the stack screen has a header. The toast appears to be rendered behind the navigation header.
Steps to reproduce
Wrap your app in SafeAreaProvider
Use a stack navigator from @react-navigation/stack with the default header shown
Render at the root level
Trigger a toast from any screen
Observe on iOS — the toast does not appear or is hidden behind the header
Expected behavior
Toast should appear above all content, including headers, when rendered at the top of the component tree.
Screenshots
If needed, include screenshots or a video of the behavior.
Code sample:
// App.tsx
// AuthNavigation.tsx
<Stack.Navigator>
<Stack.Screen name="Auth" component={SignInScreen} />
</Stack.Navigator>
Environment
OS: iOS 18.5
Expo SDK: 53
react-native: 0.79.5
react-native-toast-message: 2.3.3
react-native-safe-area-context: 5.4.0
@react-navigation/stack: 7.4.2
Additional context
This only occurs on iOS. Manually setting topOffset on the component doesn’t resolve the issue consistently. It appears to be a z-index/stacking issue when SafeArea and Stack headers are both involved.