一、基础知识 React API 一览
2021-05-30 01:16
标签:export val change NPU type port bind col hook 参考文章:https://juejin.im/post/5be3ea136fb9a049f9121014 demo: My Name is: {name} 一、基础知识 React API 一览 标签:export val change NPU type port bind col hook 原文地址:https://www.cnblogs.com/QianDingwei/p/11072363.html1.10 Hooks
/**
* 必须要react和react-dom 16.7以上
*/
import React, { useState, useEffect } from ‘react‘
export default () => {
const [name, setName] = useState(‘jokcy‘)
useEffect(() => {
console.log(‘component update‘)
return () => {
console.log(‘unbind‘)
}
}, [])
return (
1.11 React.children