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