Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 617 Bytes

navigation-usage.md

File metadata and controls

23 lines (18 loc) · 617 Bytes

How to render the Toast when using a Navigation library?

  1. Usage with react-navigation

Usage with react-navigation

To have the Toast visible on top of the navigation View hierarchy, render it as the last child in the View hierarchy (along the root Navigation component):

import Toast from 'react-native-toast-message'
import { NavigationContainer } from '@react-navigation/native';

export function App() {
  return (
    <>
      <NavigationContainer>
        {...}
      </NavigationContainer>
      <Toast />
    </>
  );
}