# react hooks 中如何模拟 componentDidMount

Issue

欢迎在 Issue 中交流与讨论: Issue 143 (opens new window)

useEffect,把第二个参数即依赖的状态,设置为 []

useEffect(callback, [])
Last Updated: 1/17/2021, 2:02:56 PM