📜  useref 对象可能为 null - Javascript 代码示例

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

代码示例1
//Specify the type or assign a variable with the same type 
const overlayEl = useRef(null);
or
const overley E1 = useRef(document.createElement('div'));