Weird interaction between setTimeout and state set function

后端 未结 0 1533
感动是毒
感动是毒 2020-12-24 14:00

given this code snippet:

const [filled, setFilled] = useState(0);
//...
useEffect(() => {
    console.log("start");
    setFilled(() => {
             


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题