📜  使用状态与使用 ref - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:49.877000             🧑  作者: Mango

代码示例1
Source: https://stackoverflow.com/a/56456055
The main difference between both is : useState causes re-render, useRef does not.