top | item 28191992

(no title)

mlsarecmg | 4 years ago

no ref is used as an element in that code.

    const ref = useRef()
    useEffect(() => console.log(ref), [])
    return <div ref={ref} />
will return { current: [dom node] }

    const ref = useRef()
    useEffect(() => console.log(ref), [])
    return <mesh ref={ref} />
will return { current: [mesh node] }

discuss

order

No comments yet.