Closed coder89 closed 2 years ago
Fixes typescript error for a given case:
const ref = useRef<Mesh>(); useEffect(() => { const mesh = ref.current; }, []); return <mesh ref={ref} />
Without that change one needs to write below code to workaround type check errors which defeats the purpose:
const ref = useRef(); useEffect(() => { const mesh = ref.current as Mesh; }, []); return <mesh ref={ref} />
thanks Lukasz!! That's a helpful addition 😄
Fixes typescript error for a given case:
Without that change one needs to write below code to workaround type check errors which defeats the purpose: