Can react-router4 block access to a route?

now there is a function that needs to determine the permission of the address of the route. If you do not have the permission, you will not enter the route.
saw this

in the react-router document.
const getConfirmation = (message, callback) => {
  const allowTransition = window.confirm(message)
  callback(allowTransition)
}

<BrowserRouter getUserConfirmation={getConfirmation}/>

but if you click cancel, you will still enter the route. is there any divine guidance?

Apr.13,2021

use the route guard hook to determine whether you have permission before entering the route, and return to the upper layer route or error page if not.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e46947-4c2cf.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e46947-4c2cf.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?