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
I am building for my app some reusable components that should use React.ForwardRef. Unfortunately i don't understand how to handle React.ForwardRef combine to as props.
Here is a sandbox about a Stack component.
Currently this component doesn't handle ref correctly.
Could you give me some advice on how to do that ?
PS : i'm not tied to use as: "div" | "ul" | "ol" | "section" i'm fine using the default as props but i didn't manage to make it work with StackProps.
I already try to handle as much as possible directly through styled-components but in some cases more complex i need to switch between two different styled-components :
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi guys !
I am building for my app some reusable components that should use
React.ForwardRef
. Unfortunately i don't understand how to handleReact.ForwardRef
combine toas
props.Here is a sandbox about a
Stack
component.Currently this component doesn't handle ref correctly.
Could you give me some advice on how to do that ?
PS : i'm not tied to use
as: "div" | "ul" | "ol" | "section"
i'm fine using the default as props but i didn't manage to make it work withStackProps
.I already try to handle as much as possible directly through
styled-components
but in some cases more complex i need to switch between two different styled-components :Beta Was this translation helpful? Give feedback.
All reactions