📜  如何在反应中使用 useref 钩子 - Javascript 代码示例

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

代码示例3
const refContainer = useRef(initialValue);
//useRef returns a mutable ref object whose .current property is initialized to the passed argument (initialValue). 
//The returned object will persist for the full lifetime of the component.