React Class組件生命周期

  • 2021 年 8 月 13 日
  • 筆記

一、react组件的两种定义方式 1、函数组件,简单的函数组件像下面这样,接收Props,渲染DOM,而不关注其他逻辑 function Welcome(props) { return <h1>Hello, {props.name}</h1>; } 函数组件无法使用State,也无法使用组件的生命周 &hellip;

Continue Reading