REACT Stateless Functional Component
发布时间:2020-12-15 07:36:52 所属栏目:百科 来源:网络整理
导读:stateless function component 在 0.14 版本中提供,适用于没有state ,输出内容的变化仅仅依赖于输入的props that has no state and returns the same markup given the same props const Hehe = (props) = phehe/p; 好处: 1.代码少,结构清楚 2符合state
stateless function component 在 0.14 版本中提供,适用于没有state ,输出内容的变化仅仅依赖于输入的props that has no state and returns the same markup given the same props
const Hehe= (props) =>
<p>hehe</p>;
好处:
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |