3.10 react 路由链接和普通链接的区别

通过路由链接修改url不会发起http请求

路由链接实际上是利用history对象的push方法/replace方法进行路由跳转(不会发起http请求)

window.location方法进行页面跳转(发起http请求)

通过普通链接修改url会发起http请求

原文地址:https://www.cnblogs.com/xjt31/p/14512414.html