React Hooks中使用useContext 进行父组件向子组件传值
摘要:
1、封装的公共文件 在组件外部建立一个Context // createContext.js文件 import { createContext } from "react"; const myContext = createContext(null); export default myContex 阅读全文
posted @ 2020-10-21 14:28 ranyonsue 阅读(1014) 评论(0) 推荐(0) 编辑