随笔分类 -  react+antd+hooks+dva+umi(react技术栈路线)

最近一直在看react的相关知识恶补下
摘要:react项目开发记录 1.antd RangePicker 设置当前一年的选择时间 <RangePicker style={{ width: "100%" }} value={[this.state.startValue,this.state.endValue]} onChange={this.h 阅读全文 »
posted @ 2021-09-30 17:23 鱼樱前端 阅读(163) 评论(0) 推荐(0) 编辑
摘要:/* * @Descripttion: React官方状态管理库—— Recoil * @version: * @Author: lhl * @Date: 2021-03-24 15:37:36 * @LastEditors: lhl * @LastEditTime: 2021-03-24 16:5 阅读全文 »
posted @ 2021-03-26 18:55 鱼樱前端 阅读(662) 评论(0) 推荐(0) 编辑
摘要:/* * @Descripttion: React hook 以及 React Fiber 原理 * @version: * @Author: lhl * @Date: 2021-03-10 15:42:23 * @LastEditors: lhl * @LastEditTime: 2021-03- 阅读全文 »
posted @ 2021-03-26 18:53 鱼樱前端 阅读(673) 评论(0) 推荐(0) 编辑
摘要:一、废除的生命周期官网文档指出使用这些生命周期的代码会在未来版本的react中更容易产生bug,尤其是对于异步渲染的版本由于未来采用异步渲染机制,所以即将在17版本中去掉的生命周期钩子函数componentWillMountcomponentWillRecievePropscomponentWIll 阅读全文 »
posted @ 2021-03-26 18:52 鱼樱前端 阅读(520) 评论(1) 推荐(0) 编辑
摘要:/* * @Description: ref 的场景和 传送门 Portal 作用以及使用 * @Version: 2.0 * @Autor: lhl * @Date: 2020-06-01 10:20:33 * @LastEditors: lhl * @LastEditTime: 2020-06- 阅读全文 »
posted @ 2020-06-02 14:09 鱼樱前端 阅读(1008) 评论(0) 推荐(0) 编辑
摘要:/* * @Description: 受控和不受控制的表单字段都有其优点不必纠结用哪种 * @Version: 2.0 * @Autor: lhl * @Date: 2020-06-01 10:20:33 * @LastEditors: lhl * @LastEditTime: 2020-06-02 阅读全文 »
posted @ 2020-06-02 10:27 鱼樱前端 阅读(367) 评论(0) 推荐(0) 编辑
摘要:/* * @Description: react基础语法集锦,每天了解一点点 * @Version: 2.0 * @Autor: lhl * @Date: 2020-06-01 10:20:33 * @LastEditors: lhl * @LastEditTime: 2020-06-01 11:4 阅读全文 »
posted @ 2020-06-01 11:51 鱼樱前端 阅读(975) 评论(0) 推荐(0) 编辑
摘要:/* * @Description: umi3.0基础配置文件 文件多时候移到config文件下面单独配置模块 如 路由文件 .umirc.ts配置文件 * @Version: 2.0 * @Autor: lhl * @Date: 2020-03-20 14:15:48 * @LastEditors 阅读全文 »
posted @ 2020-05-27 13:43 鱼樱前端 阅读(13306) 评论(2) 推荐(2) 编辑
摘要:import { Button, Result } from 'antd'; import React from 'react'; import { history } from 'umi'; // FC = Functional Component 使用这个类型有个好处就是,提醒你必须返回一个Re 阅读全文 »
posted @ 2020-05-26 18:02 鱼樱前端 阅读(1612) 评论(0) 推荐(0) 编辑
摘要:/* * @Description: Hook 是 React 16.8 的新增特性 这里看一些基础用法 动机: 1.在组件之间复用状态逻辑很难(由 providers,consumers,高阶组件,render props 等其他抽象层组成的组件会形成“嵌套地狱”) 2.复杂组件变得难以理解 3. 阅读全文 »
posted @ 2020-04-20 16:29 鱼樱前端 阅读(1502) 评论(0) 推荐(1) 编辑
摘要:1.组件名称必须以大写字母开头 React 会将以小写字母开头的组件视为原生 DOM 标签; 2.Props 的只读性,组件无论是使用函数声明还是通过 class 声明,都决不能修改自身的 props,React 组件都必须像纯函数一样保护它们的 props 不被更改 3.不要直接修改 State, 阅读全文 »
posted @ 2020-04-20 14:57 鱼樱前端 阅读(298) 评论(0) 推荐(0) 编辑
摘要:// AntdTest 测试 redux 组件 // 在src/index.js文件中 import 'antd/dist/antd.css' 安装 antd 的命令 npm install antd --save import React, { Component } from 'react' i 阅读全文 »
posted @ 2020-04-20 09:53 鱼樱前端 阅读(841) 评论(3) 推荐(0) 编辑
摘要:umi+ dva + antd构建react工程项目(组件化开发搭建项目)1.官方网站安装node.js(并确保 node 版本是 10.13 或以上)2.先确保安装成功npm或者yarn3.npm i yarn tyarn -g (国内源)4.如果你没有 npx,需要先安装它,用于执行 node_ 阅读全文 »
posted @ 2020-03-18 10:47 鱼樱前端 阅读(1499) 评论(0) 推荐(0) 编辑
摘要:1.npm install -g create-react-app 创建新项目 2.npm install --save react-router-dom 安装路由 3.组建测试代码测试组件 import React, { Component } from 'react' import { Brow 阅读全文 »
posted @ 2020-03-17 16:27 鱼樱前端 阅读(294) 评论(0) 推荐(0) 编辑
摘要:1.安装 npm install --save redux-thunk 2.安装 npm install --save redux-saga 二者可选择其中一样使用; // store/index文件 如果你要使用中间件,就必须在redux中引入applyMiddleware import { cr 阅读全文 »
posted @ 2020-03-13 15:50 鱼樱前端 阅读(114) 评论(0) 推荐(0) 编辑
摘要:1.npm install --save redux (安装) 2.在src下面新建store文件夹,文件夹下面新建index.js文件、reducer.js文件 // store/index文件 import { createStore } from 'redux'; import reducer 阅读全文 »
posted @ 2020-03-12 15:47 鱼樱前端 阅读(131) 评论(0) 推荐(0) 编辑
摘要:import React, { Component } from 'react' import logo from './logo.svg'; import './App.css'; import axios from 'axios' // react 使用 axios // 本页面只做基础的 re 阅读全文 »
posted @ 2020-03-11 12:14 鱼樱前端 阅读(185) 评论(0) 推荐(0) 编辑
摘要:1.下载并按照nodejs 版本控制建议下载nvm管理(node版本管理工具)2.安装官方脚手架工具 npm install -g create-react-app mkdir ReactDemo // 创建ReactDemo文件夹cd ReactDemo // 进入ReactDemo文件夹crea 阅读全文 »
posted @ 2020-03-11 12:09 鱼樱前端 阅读(140) 评论(0) 推荐(0) 编辑
摘要:props的验证: state和props的互用: 阅读全文 »
posted @ 2018-11-08 15:53 鱼樱前端 阅读(1126) 评论(0) 推荐(0) 编辑
摘要: 阅读全文 »
posted @ 2018-11-08 15:23 鱼樱前端 阅读(313) 评论(0) 推荐(0) 编辑

 
拂雪 - 不才
00:00 / 00:00
An audio error has occurred, player will skip forward in 2 seconds.
  1. 1 往后余生 王贰浪
  2. 2 拂雪 不才
  3. 3 我的一个道姑朋友 洛尘鞅
  4. 4 大田后生仔 王雨萌
点击右上角即可分享
微信分享提示