Extract code for organising #36
-
Let's say I want to create a component that gives back <Tabs.Trigger... can I do that? How?
I was trying something similar and I got an error saying unsuitable for render |
Beta Was this translation helpful? Give feedback.
Answered by
andy-hook
Aug 21, 2023
Replies: 1 comment
-
You can return the part after forwarding const MyTrigger = React.forwardRef((props, forwardedRef) => {
return <Tabs.Trigger {...props} ref={forwardedRef} />;
}); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
vladmoroz
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can return the part after forwarding
MyTrigger
props and refs to it: