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