Re:React Renderer for Three.js
by mlsarecmg on Sunday August 15, 2021 @03:41PM
(#28191823)
r3f is a custom renderer, there is no difference in useRef between a div or a mesh, refs give you the underlying object. lowercase elements are native elements (div, span, mesh, view, box), they are defined by the renderer. uppercase is for components.
[ Parent
| on HN ]
Ah, if they're using a custom JSX Pragma it might make sense. Still a little too bespoke for me.
no special jsx pragma needed. this is actually just plain react, <div> <span> and so on come from react-dom, which defines these elements. other renderers define theirs. here's a mini custom renderer if this interests you: https://codesandbox.io/s/reurope-reconciler-hd16y