pmndrs / gltfjsx

🎮 Turns GLTFs into JSX components
https://gltf.pmnd.rs
MIT License
4.73k stars 312 forks source link

Wrap generated component in forwardRef #55

Closed AndrewPrifer closed 3 years ago

AndrewPrifer commented 3 years ago

Would resolve this issue in particular: https://github.com/AndrewPrifer/react-three-editable/issues/49. @drcmda if there are no caveats to this, I could open a pull request, however I imagine to support cases when a ref is needed to the group inside the component as well, we would have to assume something like react-merge-refs being installed as a dependency.

drcmda commented 3 years ago

but cant users do that quickly by hand? i kind of dislike forwardref and how ugly it makes components look - and it will be terminated next react major.

AndrewPrifer commented 3 years ago

Yes, so I heard and I'm looking forward to it! I also suggested the same there, just thought I'd check with you.