79678844

Date: 2025-06-25 10:10:52
Score: 0.5
Natty:
Report link
export const resetAndNavigate = (screenName, params = {}) => {
  if (navigationRef.isReady()) {
    navigationRef.reset({
      index: 0,
      routes: [{ name: screenName, params }],
    });
  }
};

Edit this fn and add navigation ref to navigation container to directly switch to screen
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: MohammadAkil Chaklawala