摘要:
① useEffect相当于componentDidMount和componentDidUpdate两个生命周期函数 ②useEffect是异步的 解绑生命周期函数 componentDidMount 阅读全文
摘要:
import React, { useState } from 'react'; // Hook 写法 function App2 () { const [count,setCount] = useState(0) return ( <div> <h2>点击{count}</h2> <button 阅读全文
摘要:
① ②通过this.props重定向 阅读全文