I have a child component of a component. And I want to get and use its placeholder attribute. How can I do this?
I tried the following
<Namer>
<input placeholder="firstname" type="text"/>
</Namer>
component code
function Namer({children}){
return <div>
{children.map(child=>{
<>
<label>{child.getAttribute("placeholder")}</label>
{child}
</>
})}
</div>
}