随笔分类 -  React

摘要:https://github.com/CJY0208/react-activation/blob/master/README_CN.md import { AliveScope } from 'react-activation'; <AliveScope> <Router /> </AliveSco 阅读全文
posted @ 2024-01-29 16:51 起风了1573 阅读(107) 评论(0) 推荐(0) 编辑
摘要:路由我已经安装过了,执行下面命令 npm install react-router-config -S 目录结构 index.js Home.js import { renderRoutes } from "react-router-config"; import { routes } from " 阅读全文
posted @ 2020-11-05 09:56 起风了1573 阅读(862) 评论(0) 推荐(0) 编辑
摘要:父组件 获取子组件搜索框传过来的值 childValue = (data) => { console.log(data); }; <Search getChildValue={this.childValue} /> 子组件 onFinish = (values) => { this.props.ge 阅读全文
posted @ 2020-11-04 10:24 起风了1573 阅读(185) 评论(0) 推荐(0) 编辑
摘要:一、安装各种依赖 yarn add 或者 npm install + antd babel-plugin-import customize-cra less less-loader 如果执行报错请如下操作 yarn remove less-loader yarn add less@2.7.2 yar 阅读全文
posted @ 2020-10-28 15:33 起风了1573 阅读(122) 评论(0) 推荐(0) 编辑
摘要:一、安装 redux、react-redux、redux-thunk npm install redux --save yarn add redux --save npm install react-redux --save yarn add react-redux --save npm insta 阅读全文
posted @ 2020-10-28 09:46 起风了1573 阅读(133) 评论(0) 推荐(0) 编辑
摘要:先安装 antd npm install antd -S yarn add antd -S cnpm install antd -S 在index.js入口文件中引入 import 'antd/dist/antd.css' 在页面中使用 import { Form, Input, Button }  阅读全文
posted @ 2020-10-22 17:33 起风了1573 阅读(152) 评论(0) 推荐(0) 编辑
摘要:父组件 引入子组件,子组件的名字一定要大写 如Header import Header from '../../compontens/header/Header' export default function App() { function getChildrenData(e) { consol 阅读全文
posted @ 2020-10-22 17:23 起风了1573 阅读(7445) 评论(1) 推荐(0) 编辑

点击右上角即可分享
微信分享提示