1.启用严格模式

2.关于标签引用的时候

is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.

组件首字母大写

3.为了再次避免一些无语的问题,

1.所遇的变量都是小写

4.一些的问题

1.就是jsx 中都是用{} 来代表值得,而不是在Vue 中的样子

5.组件中的state 

React 查漏补缺1

 

6.正常情况下,是不会出现length 或者为undefined   排除所有的大小写,全部小写

7.任何要清理state的都是要用他的方法的setState

8.多级传递state 只能一层一层的传递下去

9.React 这样的调用就会引发一些的问题

React 查漏补缺1

 在该阶段,我想用来自父组件的方法,去更改父组件的state,就会产生错误

Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.
 

如果你在Jsx 中这样还可以解决

https://stackoverflow.com/questions/48497358/reactjs-maximum-update-depth-exceeded-error

但是字啊这个生命周期内,我真的不能想象,除非,我们把状态重置放在外面.

相关文章:

  • 2018-01-07
  • 2021-06-14
  • 2019-07-29
  • 2021-09-04
  • 2020-07-10
  • 2018-01-14
  • 2021-11-29
  • 2021-10-07
猜你喜欢
  • 2021-09-19
  • 2018-03-11
  • 2018-12-22
  • 2019-01-12
  • 2021-08-27
  • 2020-10-23
  • 2020-05-12
  • 2021-08-04
相关资源
相似解决方案