0

I am trying to make the software back button of a specific stack screen of react native navigation take the user to the first stack and pop all the others.

I tried using useEffect() and useFocusEffect() but I am always getting the error: Maximum call stack size exceeded. Any help?

1 Answers1

0

You can use reset functionality from react-navigation.

Here is the documentation for this:

https://reactnavigation.org/docs/1.x/navigation-actions/#reset

FreakyCoder
  • 840
  • 11
  • 24