when i’m trying to pass the title like this
BookShelf shelfBooks={wantReadShelf} ShelfTitle="Want To Read" handelChange={handelChange}/>
then recive it her
const BookShelf =({shelfBooks,ShelfTitle,handelChange})=>{
return (
<div className="bookshelf">
<h2 className="bookshelf-title" value={ShelfTitle}>{ShelfTitle} shelfTitle</h2>
however ‘shelfBooks’ is passed succssefully
>Solution :
Try using shelfTitle in lowercase instead like
const BookShelf =({shelfBooks,shelfTitle,handelChange})=>{
return (
<div className="bookshelf">
<h2 className="bookshelf-title" value={ShelfTitle}>{shelfTitle} shelfTitle</h2>
This is because React follows the convention of using camelCase for naming props and state variables.