react的hook,我们经常这样写
const [count, setCount] = useState(0) useEffect(()=>{ setCount(count); },[props.count])
这中操作为什么算副作用
setCount(count)
=>
setCount(props.count)
?
1.4m articles
1.4m replys
5 comments
57.0k users