Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

pass component as props react

const Label = props => <span>{props.content}</span>
const Tab = props => <div>{props.content}</div>
const Page = () => <Tab content={<Label content='Foo' />} />
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pass #component #props #react
ADD COMMENT
Topic
Name
8+5 =