Tag: props

  • Pass a Component as a Child Prop and Render it – ReactJs

    Hi everyone, A quick post on how to pass a component as a prop and then render it as a child. const ChildComponent = () => Child Component; const MainComponent = (props) => Main component. Child appears below{props.content}; class App extends React.Component { render () { return ( <MainComponent content={} /> ); } } An…

Create a website or blog at WordPress.com