zoukankan      html  css  js  c++  java
  • react with detail

    1.setState的方法不能用在render中,可用this.state=" "代替,一般不推荐,在render里面不应该有此操作。

    2.setState引起重新渲染render是一个异步操作。

    3.return后面不能直接换行,要跟代码或者大括号。

    4.原生HTML元素名以小写字母开头,而自定义的react组件必须以大写字母开头。除此之外还需要注意组件类只能包含一个顶级标签,否则报错。

    5.页面间传值link=‘houseInfo?id=${record.id}';接收页面:var id = this.props.location.query.id。

    6.render里面声明元素时,应当给予恰当的数据类型。

    7.打印log时用逗号,不要用加号,加号不能展开object类型数据。

    8.行内样式style={{marginTop:-20}},双引号,驼峰式,不带’px'。

    一树一菩提,一步一脚印。

  • 相关阅读:
    template(2.2)
    Filter过滤链条
    The 3n + 1 problem
    Struts2.3+Spring4.0
    康托展开
    templates(2.1)
    templates(1.2)
    templates(1.1)
    我和你
    Android 的上下文菜单: Context Menu
  • 原文地址:https://www.cnblogs.com/yuanyuan0809/p/6931260.html
Copyright © 2011-2022 走看看