fhefh2015 opened this issue 3 years ago · 1 comments
个人猜测 不知道是否是这样
<button onClick={() => {setObj({...obj,a:obj.a+1})}}>a+1</button> <button onClick={() => {setObj({...obj,b:obj.b+1})}}>a+1</button> // 应该为 <button onClick={() => {setObj({...obj,b:obj.b+1})}}>b+1</button>
确实如你所说,感谢提醒。