随笔分类 - React
摘要:https://github.com/CJY0208/react-activation/blob/master/README_CN.md import { AliveScope } from 'react-activation'; <AliveScope> <Router /> </AliveSco
阅读全文
摘要:路由我已经安装过了,执行下面命令 npm install react-router-config -S 目录结构 index.js Home.js import { renderRoutes } from "react-router-config"; import { routes } from "
阅读全文
摘要:父组件 获取子组件搜索框传过来的值 childValue = (data) => { console.log(data); }; <Search getChildValue={this.childValue} /> 子组件 onFinish = (values) => { this.props.ge
阅读全文
摘要:一、安装各种依赖 yarn add 或者 npm install + antd babel-plugin-import customize-cra less less-loader 如果执行报错请如下操作 yarn remove less-loader yarn add less@2.7.2 yar
阅读全文
摘要:一、安装 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
阅读全文
摘要:先安装 antd npm install antd -S yarn add antd -S cnpm install antd -S 在index.js入口文件中引入 import 'antd/dist/antd.css' 在页面中使用 import { Form, Input, Button }
阅读全文
摘要:父组件 引入子组件,子组件的名字一定要大写 如Header import Header from '../../compontens/header/Header' export default function App() { function getChildrenData(e) { consol
阅读全文