摘要: 关系如图所示,画的不好请见谅: 1、父传子app.js 传值 app.js传值 import React, { Component ,Fragment} from "react"; import One from "./components/one"; import Two from "./comp 阅读全文
posted @ 2019-05-23 23:13 阿萨姆✌️ 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 首先我们先安装 react-router-dom (react4.0的路由) yarn add react-router-dom cnpm i react-router-dom -s 如何使用? 在react中路由配置项都是组件 凡是被路由包裹的组件都可以使用路由 BrowserRouter Has 阅读全文
posted @ 2019-05-23 16:14 阿萨姆✌️ 阅读(389) 评论(0) 推荐(0) 编辑