Replies: 1 comment
-
@salimabsi You can try some of this ways: const Parent = () => {
return (
<Child childComp={<YourCompToPass />} />
)
};
const Child = (props) => {
return (
<>
{props.childComp}
</>
)
} Or using const Parent = () => {
return (
<Child>
<YourCompToPass />
</Child
)
};
const Child = (props) => {
return (
<>
{props.children}
</>
)
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have component that copies the text passed to it -
<CopyText />
When I invoke it, how to pass a styled component to it, or is there another way of doing it?
Beta Was this translation helpful? Give feedback.
All reactions