📜  功能组件中的 useref - Javascript 代码示例

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

代码示例4
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.