This.props.tracks.map is not a function TrackList.js:10

Hi all,

Working on Jamming project and have been stuck with this issue all evening and cant get around it!

Would anyone be so kind and help me to identify the problem?

Hello, welcome to the forums!

What tends to be the case with this error is that the <TrackList/> component is rendered twice (in the search results and the playlist), but only has the required props passed into once of those instances.

<TrackList/> needs to have an array of tracks (each represented by an object) passed in as props everytime its rendered, otherwise it throws an error since you’re trying to access props that don’t exist as they’re not passed in.

Happy coding! :slight_smile:

1 Like