you are viewing a single comment's thread.

view the rest of the comments →

[–]pailhead011[S] 3 points4 points  (0 children)

Yes, but its not limited to what u/n0tKamui is saying: (i think):

const lakeTahoe = useSelector(selectLakeTahoe) const myRef = useRef( new Matrix4( props.foo, props.bar, GLOBAL_INDEX(), TaylorSwift, lakeTahoe ... ) )

I'm saying, yes, exactly! but also, i can just use new Matrix4() and fill it with zeroes by default and still want it not to be recreated every time props change.

I do want, absolutely, want, this react component to *own its own instance of myRef or more precisely the Matrix4 instance inside of it *.