drei icon indicating copy to clipboard operation
drei copied to clipboard

refactor: react-merge-refs => useImperativeHandle

Open CodyJasonBennett opened this issue 3 years ago • 3 comments

Why

What

Removes react-merge-refs in favor of React's built-in useImperativeHandle.

Checklist

  • [ ] Documentation updated
  • [ ] Storybook entry added
  • [ ] Ready to be merged

CodyJasonBennett avatar Aug 18 '22 09:08 CodyJasonBennett

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
drei ❌ Failed (Inspect) Aug 18, 2022 at 9:20AM (UTC)

vercel[bot] avatar Aug 18 '22 09:08 vercel[bot]

I'm not going to be able to unravel the typing woes around Instances etc. Leaving this as a draft for now.

CodyJasonBennett avatar Aug 18 '22 09:08 CodyJasonBennett

never thought of that, nice trick actually :-O

drcmda avatar Aug 25 '22 13:08 drcmda

if you want just do any and let someone else figure it out, there are places where i did that bc it just blocked everything. useImperativeHandle makes so much sense here instead of react-use-refs, and rur has even caused problems in the past because their later version breaks compat, so removing that would be awesome.

drcmda avatar Nov 19 '22 16:11 drcmda