[feature request] Smarter goBack
Author: jankaiferCreated May 7, 2020Updated Jan 6, 2025
React router had in previous versions this feature that you could ask whether goBack leaves your app or not. I do implement cancel buttons with goBack. But If someone gets there from a link on another site it just throws them back which is usually not desired.
I worked around this by adding fromApp state prop that would indicate that it is safe to use goBack.
But that feels kinda hackish.
Source: remix-run/history