You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.
Passing a ref prop with a different name (e.g forwardedRef), which gets passed as a ref within the component.
Additional context
This is blocked by an issue at the intersection of forwardRef, defaultProps and TypeScript. (partially fixed and explained here, but this doesn't address the forwardRef case)
The text was updated successfully, but these errors were encountered:
I'm raising this after we discussed it many weeks ago! I did try to fix it but became bogged down by TypeScript issues. Did you find a way of making this work without any changes to Source?
Is your feature request related to a problem? Please describe.
In React, refs provide a reference to the DOM element associated with a React element. However React components cannot directly accept ref props.
Describe the solution you'd like
We need a way to access references to DOM elements associated with instances of Source components. Possible implementations would be:
forwardedRef
), which gets passed as a ref within the component.Additional context
This is blocked by an issue at the intersection of
forwardRef
,defaultProps
and TypeScript. (partially fixed and explained here, but this doesn't address theforwardRef
case)The text was updated successfully, but these errors were encountered: