News for hackers. Stuff that matters.
Re:React Renderer for Three.js by tills13 on Sunday August 15, 2021 @03:46PM (#28191883)
To clarify, I'm not talking about the ref _prop_, I'm talking about them using the ref as the element.
Re:React Renderer for Three.js by mlajtos on Sunday August 15, 2021 @03:57PM (#28191971)
It’s lowercase, so it will act as plain-old tag. If the name would be uppercase, that would be a bug you described.
Re:React Renderer for Three.js by tills13 on Sunday August 15, 2021 @11:55PM (#28194799)
hm, interesting. I didn't know that -- I knew about custom tags / variable tags but never knew it _required_ them to be PascalCased. I feel like if I saw code like this come from one of my team members I'd ask them to change the name of the ref.
Re:React Renderer for Three.js by mlsarecmg on Sunday August 15, 2021 @03:59PM (#28191992)
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] }