Is there a fallback function for react-router routing?

now, due to project requirements, fallback needs to be implemented in the page, but you can"t rely on the browser"s return button to search the official website documents for a long time. Ye searched a lot of relevant content, but did not find
. I hope someone can answer it. Thank you

.
Mar.06,2021

use history , see https://reacttraining.com/rea.


react-route: history.goback ()

ps: window.history.back (); can also be sprinkled, why not?

It can be returned if there is a method goBack () in

react-router.
push () Jump to a url


you can write that hashhistory is hashhistoty.push (path), bowerhistory, the new attribute history.replaceState (path) of h5, and so on.


in this.$router.go (- 1) Vue, I'm sorry I didn't read the react requirements

Menu