@ruby1026833317
In app.js it looks like you’ve defined your search results as ‘SearchResults’ (with a capital S) but passed it down to your Search Results component as ‘searchResults’ (with a little s). This is causing a knock-on effect to your map in your Tracklist component as it can’t any values to map.
class App extends React.Component {
constructor(props){
super(props);
this.state = {
SearchResults: [{ name: 'name1', artist: 'artist1', album: 'album1', id: 1},
{name: 'name2', artist: 'artist2', album: 'album2', id: 2}, {name: 'name3', artist: 'artist3', album: 'album3', id: 3}],
playlistName: 'Ma 15th bday',
playlistTracks: [{ name: 'playlistName1', artist: 'playlistArtist1', album: 'playlistAlbum1', id: 4}, {name: 'playlistName2', artist: 'playlistArtist2', album: 'playlistAlbum2', id: 5}, {name: 'playlistName3', artist: 'playlistArtist3', album: 'playlistAlbum3', id: 6}]
}
//rest of code....
return (
<div>
<h1>Ja<span className="highlight">mmm</span>ing</h1>
<div className="App">
<SearchBar onSearch={this.search} />
<div className="App-playlist">
<SearchResults searchResults={this.state.searchResults} onAdd={this.addTrack}
/>
<Playlist playlistName={this.state.playlistName} playlistTracks={this.state.playlistTracks} onNameChange={this.state.updatePlaylistName} onSave={this.savePlaylist} />
</div>
</div>
</div>
)
//rest of code....
The best practice is to name everything in ‘camelCase’ unless it is a component which needs to be in ‘TitleCase’. If you update the following then it should work:
In App.js from this:
this.state = {
SearchResults: [{ name: 'name1', artist: 'artist1', album: 'album1', id: 1},
//rest of code...
}
to this:
this.state = {
searchResults: [{ name: 'name1', artist: 'artist1', album: 'album1', id: 1},
//rest of code...
}
and in SearchResults.js from this:
class SearchResults extends React.Component {
render() {
return (
<div className="SearchResults">
<h2>Results</h2>
<TrackList tracks={this.props.tracks} track={this.props.SearchResults} onAdd={this.props.onAdd} isRemoval={false} />
</div>
)
}
};
to this:
class SearchResults extends React.Component {
render() {
return (
<div className="SearchResults">
<h2>Results</h2>
<TrackList tracks={this.props.tracks} track={this.props.searchResults} onAdd={this.props.onAdd} isRemoval={false} />
</div>
)
}
};
it should work 
Hope that helps!