摘要: ① useEffect相当于componentDidMount和componentDidUpdate两个生命周期函数 ②useEffect是异步的 解绑生命周期函数 componentDidMount 阅读全文
posted @ 2019-11-13 17:19 秋风渡明月 阅读(5157) 评论(0) 推荐(0)
摘要: import React, { useState } from 'react'; // Hook 写法 function App2 () { const [count,setCount] = useState(0) return ( <div> <h2>点击{count}</h2> <button 阅读全文
posted @ 2019-11-13 15:30 秋风渡明月 阅读(166) 评论(0) 推荐(0)
摘要: ① ②通过this.props重定向 阅读全文
posted @ 2019-11-13 08:49 秋风渡明月 阅读(1270) 评论(0) 推荐(0)