I am new to react. i have getting issue while passing the array containing object as props from one component to another component. Can u guys help me out in this ,
here is the code of card information component where i am passing value as prop
const CardsInformation = () => {
const Baba = [
{
id: 'b1',
header: 'Book 1 Name',
image: 'https://www.google.com/search?q=engineering+books&rlz=1C1CHBF_enIN862IN862&sxsrf=ALeKk01jlMEcOr-2Vd0ev6RaoZZSAqMADg:1589729471894&source=lnms&tbm=isch&sa=X&ved=2ahUKEwjO9dfjm7vpAhV8yjgGHR-zDCoQ_AUoAXoECBMQAw&biw=1536&bih=763#imgrc=OzVmsuZIvusEJM',
discription: 'This book steps beyond the simple functions of the Clapper, introducing you to a number of products that can be used for everything from controlling lighting levels, watering your lawn, closing your drapes, and managing sundry appliances in your home.',
}
];
return (
<div>
<Card_tabs book={Baba}/>
</div>
)
}
here is another component where i am using the props and getting the issue as"Cannot read property 'map' of undefined" at {props.book.map}
const Card_tabs = (props) => {
{props.book.map(user=>{
return(<h1>{user.header}</h1>)
})}
}