Closed CCleanerShot closed 7 months ago
Upon further research, I think this is the sadly the best solution. Feel free to re-open if you find something. This strangely accounts React saying that they will deprecate it, despite being the only solid way of doing this.
The video that was mentioned in discord that provided an alternative doesn't even work.
Thanks for the clarification @CCleanerShot
An old way of extending a custom Button to utilize native
button
elements, was to do use extend the interface withReact.ButtonHTMLAttributes<T>
andforwardRef()
, but React is discontinuingforwardRef()
in React 19.The current implementation is using the React hook,
useRef
, but being required to pass in auseRef
hook has a property is very tedious for a user.