stateless functional component
Component vs Stateless Functional component
Component
包含内部state,而Stateless Functional Component
所有数据都来自props,没有内部state;Component
包含的一些生命周期函数,Stateless Functional Component
都没有,因为Stateless Functional Component
没有shouldComponentUpdate
,所以也无法控制组件的渲染,也即是说只要是收到新的props,Stateless Functional Component
就会重新渲染。Stateless Functional Component
不支持Refs
相关推荐
Enjoyendless 2016-07-02
81540991 2013-07-31
Enjoyendless 2017-12-18
maiktom 2012-10-31
maiktom 2011-10-10
wghou 2011-03-21
man00 2009-10-09
algorithmfish 2008-07-28
VermillionTear 2018-09-17
didianmanong 2018-08-14
比格杰森 2013-05-31
shudou 2009-06-25