React jamming project help

Hey there, folks…

please help me through this error message

TrackList.js:8 Uncaught TypeError: Cannot read properties of undefined (reading ‘map’)

import Track from ‘…/Track/Track’
import ‘./TrackList.css’

export default function TrackList(props) {

        console.log(props.tracks);
return (
    <div className="TrackList">
        {
            props.tracks.map(track =>
                <Track 
                key={track.id}
                track={track}
                />
            )}
    </div> 
);

}

https://www.codecademy.com/paths/build-web-apps-with-react/tracks/react-capstone/modules/jammming-capstone/projects/jammming-prj

hi @mistersouza ,

i’m not sure which junction have you arrived and stuck at, and i myself have not done such path before.

after looking at the practice and some searches in the exercise, this is the closest i can find hence you may want to give it a try?

otherwise, do let me know if it works?

Cheers,

Hey there. Thank you ever so much for getting back to me.

I am exactly at this point. And whenever I tried to implement the instructions on step 34 my code breaks and I’m stuck with the following error.

Uncaught TypeError: Cannot read properties of undefined (reading ‘map’)
at TrackList (TrackList.js:7:1)
at renderWithHooks (react-dom.development.js:16175:1)
at mountIndeterminateComponent (react-dom.development.js:20913:1)
at beginWork (react-dom.development.js:22416:1)
at HTMLUnknownElement.callCallback (react-dom.development.js:4161:1)
at Object.invokeGuardedCallbackDev (react-dom.development.js:4210:1)
at invokeGuardedCallback (react-dom.development.js:4274:1)
at beginWork$1 (react-dom.development.js:27405:1)
at performUnitOfWork (react-dom.development.js:26513:1)
at workLoopSync (react-dom.development.js:26422:1)

hello, if you don’t mind may i question for you to drop a snapshot of your current codes of that file? so i can do a read through.

right now the error is stating line 7 have issue of TrackList. That’s all i know.

thanks a lot for your offering your help. I got the issue sorted. And I am going straight ahead against the next one.

no prob. my apologies that I can’t be of help but hopefully you may continue to enjoy the experience for debugging errors while in the midst of learning/building the product you love :relieved:

1 Like

thanks a lot your time and kindness