Jammming Project: steps 34-39

You must select a tag to post in this category. Please find the tag relating to the section of the course you are on

When you ask a question, don’t forget to include a link to the exercise or project you’re dealing with!

If you want to have the best chances of getting a useful answer quickly, make sure you follow our guidelines about how to ask a good question. That way you’ll be helping everyone – helping people to answer your question and helping others who are stuck to find the question and answer! :slight_smile:


Building the Jammming app I keep getting this error:

The object assigned to this.state in App.js appears to get passed in to the components SearchResults and Playlists correctly when I check in devtools in chrome. The weird thing is, the error message only appears when, in Playlist.js, I use an instance of the Tracklist component. When I use the Tracklist component in SearchResults.js the webpage loads with no issues.

Presumably ‘cannot read property map of undefined’ means that it doesn’t recognise the props I’m passing down to map, however I checked in the console before and the object appears correctly. I have tried to follow the video walk through but don’t see any error in my code.


sure but do you invoke them the same way?
if you use an empty array does one crash while the other doesn’t?
<TrackList tracks={[]}/>

the location of where you do it isn’t the difference

if you look at the error message, you can tell that undefined was provided as input, so that tells you what the difference is, you provided incorrect input. you could for example provide an empty array to show that this is the case, the error will go away, and after that, you can consider where you’ve put the value you meant to pass along

if you can see the value you want in your debug console, great, use that value.

Thanks for the help! I used an empty array as you said and for the first time when using the component in Playlist it didn’t crash. Then when I passed in the relevant props again to each TrackList component it worked perfectly.

HI, I’m seeing exactly the same error. Can you please help me on this after step 34