会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
不秃头的代码狗
博客园
首页
新随笔
联系
订阅
管理
2021年2月4日
JS基本数据类型和引用类型
摘要: 1 <!DOCTYPE html> 2 <html lang="en"> 3 4 <head> 5 <meta charset="UTF-8"> 6 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 7 <t
阅读全文
posted @ 2021-02-04 16:15 不秃头的代码狗
阅读(53)
评论(0)
推荐(0)
2021年1月19日
REACT--react生命周期(旧)
摘要: /* 1.初始化阶段:由ReactDOM.render()触发(初次渲染的时候) 1.construtor() 2.conponentWillMount() 3.render() 4.componentDidMount() 2.由组件内部this.setState()或父组件render触发 1.s
阅读全文
posted @ 2021-01-19 19:28 不秃头的代码狗
阅读(68)
评论(0)
推荐(0)
2021年1月15日
REACT--ref的三种用法
摘要: 1 <!DOCTYPE html> 2 <html lang="en"> 3 4 <head> 5 <meta charset="UTF-8"> 6 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 7 <t
阅读全文
posted @ 2021-01-15 15:21 不秃头的代码狗
阅读(219)
评论(0)
推荐(0)
2021年1月14日
REACT--props校验规则
摘要: //类式组件的props校验方法 1 <!DOCTYPE html> 2 <html lang="en"> 3 4 <head> 5 <meta charset="UTF-8"> 6 <meta name="viewport" content="width=device-width, initial
阅读全文
posted @ 2021-01-14 20:46 不秃头的代码狗
阅读(241)
评论(0)
推荐(0)
REACT--props的使用
摘要: 1.每个组件对象都会有props 2.每个组件对象的属性都会保存在props中 3.props只读属性不可以直接修改 //函数组件传入props 1 <!DOCTYPE html> 2 <html lang="en"> 3 4 <head> 5 <meta charset="UTF-8"> 6 <m
阅读全文
posted @ 2021-01-14 18:47 不秃头的代码狗
阅读(108)
评论(0)
推荐(0)
REACT--函数式组件与类式组件
摘要: 函数式组件与类式组件 //函数式组件<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"
阅读全文
posted @ 2021-01-14 17:28 不秃头的代码狗
阅读(129)
评论(0)
推荐(0)
2021年1月13日
REACT学习--初始化state和改变自定义方法this指向问题
摘要: 使用constructor来初始化state和手动改变自定义方法的this指向 class Study extends React.Component{ constructor(props){ super(props) this.state = {isS:false}; this.changeSta
阅读全文
posted @ 2021-01-13 18:00 不秃头的代码狗
阅读(156)
评论(0)
推荐(1)
react Jsx语法规则
摘要: 定义虚拟dom时,不要用引号。 标签中混入JS的表达式时用{} 样式指定类名class替换成className 内联样式,需要用style={{key:value}}的形式去写 只有一个根节点 标签必须闭合 标签首字母 小写字母开头,识别成html标签同名标签,无则报错 大写字母开头,识别成reac
阅读全文
posted @ 2021-01-13 17:35 不秃头的代码狗
阅读(54)
评论(0)
推荐(1)
公告