How does react jump to an outer chain?

I want to jump to an outer chain after clicking on the event in react. I would like to ask how to jump. The default jump method does not support jumping out of the chain.

this.context.router.history.push("/download")
this.props.history.push("/download")

both of these two jump methods can jump. What is the difference and in what scenarios are they used?


there is no difference between the two.

use the outer chain

window.location.href = 'link'

because the push method is a history jump within the program, a single-page application needs it. In fact, it does not send a request to server

Menu