4

PHOTO EMBED

Sun Oct 16 2022 02:45:01 GMT+0000 (Coordinated Universal Time)

Saved by @Vrushabh_123

// children syntax

function SomethingWhichAcceptsChildren({ children }) {
   return (
      <div>
         <p> I am a parent. I can take anything and show it as is. </p>
            { children }
      </div>
   )

function IAmAChildrenComponent(){
   return <div> I am a baby! And I eat jalebi! </div>
}

<SomethingWhichAcceptsChildren notLikeThis={"thisWontWork"}>
   <IAmAChildrenComponent />
</SomethingWhichAcceptsChildren>

<IamComponent someProp={1} />

// What will be the output of this?

<div>
   <p> I am a parent. I can take anything and show it as is. </p>
   <div> Main to hun baby! Khaao jalebi! </div>
</div>
content_copyCOPY