I want to know, how can I pass props to other component? Something like objectid={top.id} through an anchor tag.
{lists.map((top) => {
return (
<li key={id}>
<a href={'/object/'+ slugify(top.title) } objectid={top.id}>
<img alt={top.title} src={top.image-url}/>
</a>
</li>
)})
}
I want to pass {top.id} to the component which will be rendered on going to url from href given and there I can access it like props.objectid