摘要:
React入门的的时候,我们(我自己啦)喜欢都跟着例子来,用标签的语法写JSX,比如:<Mycomponent key={this.props.id} onClick={this.props.doSth} ></Mycomponent > 觉得真是在js里写html。 现在文档告诉我们,JSX这种写 阅读全文
posted @ 2017-09-04 23:12
瓶子2333
阅读(271)
评论(0)
推荐(0)
摘要:
发现React中自定义的html特性在render后是不现实,而且getAttribute方法也只能获取到undefined。 后来去stackoverflow提问,网友回答说: It depends on which attributes you are talking about. Usuall 阅读全文
posted @ 2017-09-04 20:04
瓶子2333
阅读(414)
评论(0)
推荐(0)
摘要:
今天在练习React构建组件的时候遇到一个问题。 由于文档中反复提倡将组件尽可能按功能单位分解复用。在练习用React做一个todolist时候,我把todolist分解成两部分: class Todolist = class Writedown + class Todo; 其中 class Wri 阅读全文
posted @ 2017-09-04 16:04
瓶子2333
阅读(243)
评论(0)
推荐(0)

浙公网安备 33010602011771号