会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Eric
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
13
14
15
16
17
18
19
20
21
···
61
下一页
2021年8月28日
ref,computed 用法
摘要: ref,computed 用法 <template> <div> <h1>{{count}}</h1> <h1>{{double}}</h1> <button @click="increase">+1</button> </div> </template> <script lang="ts"> im
阅读全文
posted @ 2021-08-28 14:50 13522679763-任国强
阅读(160)
评论(0)
推荐(0)
2021年8月20日
useState 使用方法
摘要: import React,{useState} from 'react' export default function ComplexHookState() { const [friends, setFriends] = useState(['李雷','科比']) const [students,
阅读全文
posted @ 2021-08-20 17:51 13522679763-任国强
阅读(888)
评论(0)
推荐(0)
2021年8月16日
配置antd 主题颜色 和 别名
摘要: yarn add antdyarn add @ant-design/iconsyarn add moment // 配置andt 主题yarn add @craco/craco// 修改配置命令 "scripts": { "start": "craco start", "build": "craco
阅读全文
posted @ 2021-08-16 17:45 13522679763-任国强
阅读(472)
评论(0)
推荐(0)
2021年8月13日
classnames 使用方法
摘要: import React, { PureComponent } from 'react' // yarn add classnames import classNames from 'classnames' export default class app extends PureComponent
阅读全文
posted @ 2021-08-13 17:05 13522679763-任国强
阅读(2150)
评论(0)
推荐(0)
styled-components 使用方法
摘要: yarn add styled-components 1 import styled from 'styled-components' export const HomeWrapper = styled.div ` font-size:20px; color:red; .banner{ backgr
阅读全文
posted @ 2021-08-13 15:01 13522679763-任国强
阅读(151)
评论(0)
推荐(0)
高阶组件应用-生命周期劫持-查看渲染时间
摘要: import React, { PureComponent } from 'react' function withRenderTime(WrappedComponent){ return class extends PureComponent{ componentWillMount() { thi
阅读全文
posted @ 2021-08-13 09:41 13522679763-任国强
阅读(153)
评论(0)
推荐(0)
2021年8月12日
高阶组件应用-登录鉴权操作
摘要: import React, { PureComponent } from 'react' // class LoginPage extends PureComponent { render() { return ( <div> <h2>LoginPage</h2> </div> ) } } func
阅读全文
posted @ 2021-08-12 17:46 13522679763-任国强
阅读(85)
评论(0)
推荐(0)
(二)高阶组件的应用-增强props
摘要: import React, { PureComponent, createContext } from 'react' import { render } from 'react-dom' // 定义一个高阶组件 function withUser(WrappedComponent){ return
阅读全文
posted @ 2021-08-12 17:20 13522679763-任国强
阅读(64)
评论(0)
推荐(0)
(-)高阶组件的应用-增强props
摘要: import React, { PureComponent } from 'react' // 定义一个高阶组件 function enhanceRegionProps(WrappedComponent){ return props => { return <WrappedComponent {..
阅读全文
posted @ 2021-08-12 17:19 13522679763-任国强
阅读(33)
评论(0)
推荐(0)
非受控组件(不推荐使用)
摘要: import React, { PureComponent,createRef } from 'react' export default class App extends PureComponent { constructor(props){ super(props) this.username
阅读全文
posted @ 2021-08-12 15:13 13522679763-任国强
阅读(31)
评论(0)
推荐(0)
上一页
1
···
13
14
15
16
17
18
19
20
21
···
61
下一页
公告