15 React路由 动态路由以及get传值 React中使用url模块
概述新闻列表 —跳转—> 详情页 时,想把列表对应的id传到详情页里,可用到三种传值方法:1、get传值2、动态路由3、localstorage一、动态路由传值App.jsimport React from "react";import { BrowserRouter as Router, Switch, Route, Link } from "react-router-dom";import Header from "./comp