How do I make a button that acts like a back button in the stack navigator?

I created a Stack navigator and made HeaderMode none. And I created the back button myself. This was different from the back button that was automatically generated when HeaderMode was screen. I want to create a back button that is created automatically. This goes back to closing the screen and showing the screen below. This redisplays the original screen without updating it. How do I make my back button work the same way?

You can use an app variable for this @mom7667yafy

If you store the Screen that you’ve just come from, when you click the back button you can go back to that Screen.

Two follow up questions:

  1. Do you have a “sitemap” for your app, showing what screens are connected to one another?

  2. How many screens are in your custom navigator?

How would you store the screen and how would it be called back?