title: Correctly handling the BFCache in react
body: <p>I'm showing a loading screen (state) before redirecting to an external url (payment provider), since they tend to load for a while.</p>
  <p>If the user chooses not to complete the payment and goes <code>history.back()</code> (Gesture, back button, ...) the browser pulls the page before from the <a href="https://web.dev/bfcache/" rel="nofollow noreferrer">BFCache</a>, including the loading state, and the user will be &quot;stuck&quot; loading forever.</p>
  <p>How would you suggest handling that?   Persisted loads can be detected using the <code>pageshow</code> event, but I'm not sure if that is the react way to handle the case.</p>