When I map over an array of books to display the titles in a list, I encounter an issue with the initial empty string value for the title. This causes the list to render an empty item initially. Below is my book array:
@observable books = [
{title:"", owned: false}
]
To display the books, I use the following code:
<div>
{this.props.store.books.map((b)=>{
return (
<ul>
<li>{b.title}</li>
</ul>
)
})}
</div>
I am looking for a solution to prevent the empty title from being displayed.