History

Information about the history is accessible through the useHistory hook.

function Route() {
	let history = useHistory()
		...
}

History conforms the History interface, so take a look at this native web platform api if you are not familiar.