// 1. 函数组件体(返回jsx)
// 2. 函数组件名(大写)
const OneTime =()=> {
  return <div>hello world{new Date().toString()}</div>
}
// 3. 函数组件使用
const ele = <div>{<OneTime></OneTime>}</div>
export default ele

  函数组件的组成

    函数体(返回jsx)+名字(首字母必须大写)+使用

相关文章:

  • 2021-10-06
  • 2022-01-01
  • 2022-01-13
  • 2021-10-09
  • 2022-12-23
  • 2021-12-19
  • 2021-05-04
  • 2021-04-07
猜你喜欢
  • 2021-07-11
  • 2021-04-27
  • 2022-12-23
  • 2022-12-23
  • 2021-08-11
  • 2022-12-23
  • 2022-03-06
相关资源
相似解决方案