How does react-router4.2 (up to date) have programmatic navigation and navigation guards like vue-router?

how to do the following two ways
-programmatic navigation-

router.push ({name: "user", params: {userId: 123}})

/ / with query parameters, change to / register?plan=private
router.push ({path: "register", query: {plan:" private"}})

-Navigation guard-
const router = new VueRouter ({.})

router.beforeEach ((to, from, next) = > {
/.
})

=


this.props.history.push ('/ xx')


have you solved it? I also need to do some preprocessing before jumping


window.location.href ='/ user/login'

.
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-1eae44a-21bc.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-1eae44a-21bc.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?