Are you first timer at Why not join us and start exchange your programming knowledge with everyone. Register today!

Props - Specify html tags on component with props

0 votes
added Feb 10 in React by lcjr First Warrant Officer (8,030 points)
// ChildComponent
function NarrativeMainSectionBox(props) {
    return (
        <div className="section-card hover-box-parent">
          <div className="hover-box">
            <img src={props.imgurl} />
// ParentComponent
return (
    <div className="section-box"> 
      <ChildComponent imgurl="/images/1.png" />  
      <ChildComponent imgurl="/images/2.png" />


Please log in or register to response this reference. - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.