Answers for "create navigationcontainer ref not working"

0

create navigationcontainer ref not working

// RootNavigation.js

import * as React from 'react';

export const navigationRef = React.createRef();

export function navigate(name, params) {
  navigationRef.current?.navigate(name, params);
}


 <NavigationContainer ref={navigationRef} >
   
   // your app componets
 </NavigationContainer>
//do not forgot to add (navigationRef) into your navigation container

// add other navigation functions that you need and export them
Posted by: Guest on August-06-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language