Posts by LeoCosta001 • 43 points
1 post
-
4
votes1
answer58
viewsQ: How do I make Typescript accept the "useRef" value in React?
export const Test = (): JSX.Element => { const wrapperRef = useRef(null); useEffect(() => { function handleClickOutside(event: MouseEvent) { if (wrapperRef.current &&…