会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
shamgod
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
41
42
43
44
45
46
47
48
49
···
52
下一页
2015年12月17日
React属性的3种设置方式
摘要: 一、不推荐用setProps,因为以React的设计思想相悖,推荐以父组件向子组件传递属性的方式二、3种用法的代码1.键值对 1 2 3 4 5 Hello, World 6 7 8 9 10 37 38 2.{...props}展开属性 1 ...
阅读全文
posted @ 2015-12-17 20:53 shamgod
阅读(5357)
评论(0)
推荐(0)
2015年12月16日
React组件生命周期-正确执行运行阶段的函数
摘要: 一、二、 1 2 3 4 5 6 Document 7 8 9 10 11 12 13 58 59 60 结果:
阅读全文
posted @ 2015-12-16 23:29 shamgod
阅读(584)
评论(0)
推荐(0)
React组件生命周期-正确执行初始化阶段的函数
摘要: 一、二、代码 Document 结果:
阅读全文
posted @ 2015-12-16 23:03 shamgod
阅读(3564)
评论(0)
推荐(0)
React组件生命周期-初始化阶段的函数执行顺序
摘要: Document
阅读全文
posted @ 2015-12-16 22:30 shamgod
阅读(2210)
评论(0)
推荐(0)
React-非dom属性-key
摘要: 一、react性能1.内容类似的尽量归到同一人组件,这样react不用每次都重新渲染2.类似列表的内容,要加上key,可减少渲染次数3.react渲染过程二、代码 Document
阅读全文
posted @ 2015-12-16 21:06 shamgod
阅读(948)
评论(0)
推荐(0)
React-非dom属性-ref标签
摘要: Document
阅读全文
posted @ 2015-12-16 20:56 shamgod
阅读(422)
评论(0)
推荐(0)
React-非dom属性-dangerouslySetInnerHTML标签
摘要: Document
阅读全文
posted @ 2015-12-16 20:50 shamgod
阅读(5650)
评论(1)
推荐(0)
React 万能的函数表达式
摘要: 一、语法简介表达式可以以下两种方法,(1)(function A(){})(this),(this)参数在函数外面(2)(function B(){}(this)),(this)参数在函数里面(1)和(2)的区别在于,(1)的左边的一对括号是强制A()求值,返回函数的引用,再传this参数调用函数求...
阅读全文
posted @ 2015-12-16 00:13 shamgod
阅读(1349)
评论(0)
推荐(0)
2015年12月15日
通过表达式、函数给React组件属性赋值
摘要: 一、需求当有传属性name的值时,则显示Hello "name",否则显示Hello World二、4种方式的代码实现1.通过三元运算符 Document 2.通过变量 Document 3.直接在属性调用函数 Doc...
阅读全文
posted @ 2015-12-15 23:53 shamgod
阅读(5404)
评论(0)
推荐(0)
React的CSS
摘要: 1.代码 Document 2.运行结果3.运行后源码 Document你好React
阅读全文
posted @ 2015-12-15 23:33 shamgod
阅读(304)
评论(0)
推荐(0)
上一页
1
···
41
42
43
44
45
46
47
48
49
···
52
下一页
公告
haha