title: How to goBack globally between stacks in React Navigation?
body: <p>I am using react navigation (<code>"@react-navigation/native": "^5.1.3"</code>) and I have the following setup:</p>
  
  <pre><code>BottomNavigation
      -stack1
      -stack2
  </code></pre>
  
  <p>It looks like <code>goBack()</code> is local to the stack. What that means is that if I navigate from a page in stack1 to a page in stack2, I am unable to go the the page I came up from. </p>
  
  <p>Solutions (or rather hacks) that didn't work for me:</p>
  
  <ul>
  <li>pass the source screen as param and then navigate. That isn't a real back button and does not play well with android back button.</li>
  <li>Put all pages in bottom navigation. Bottom navigation does not have animations it seems, so I can not achieve the right transitions</li>
  <li>Put all pages in stack navigation. In this case I lose the fixed bottom navigation. I can add it to each page, but when transitioning it will go away with the old screen and come again with the new one, which is undesirable. </li>
  </ul>
  
  <p>So I am wondering if I am missing something big here, like a <code>globalBack()</code> that I overlooked?!</p>
  
  <p>And also, I am looking for a solution to this problem which remains. </p>