Does the built in tiny router allow a programmable back button? I’d like to send a user back from where they are coming from if at all possible.
Found a solution, thanks!
window.history.back() should work just fine.
What is it (if I may ask)?
That’s what I did, but sometimes it goes back to a white screen now. I’m wondering if that is because it doesn’t necessarily go “back” to the right mounted React component?
Here’s the component for reference:
The “close” should function as the back button
Could you please describe the specific steps you do to get to the white screen? We’ll take a look.
I think it’s just a blank screen, as if no react components were mounted. It doesn’t always happen, just from time to time.
And it doesn’t happen again on a reload.
If it never happens on refresh, it may be related to the way HMR refreshes the page when you make changes in development mode, because sometimes the browser history gets out of sync.
6 posts were split to a new topic: Navigate to non-existent pages