I need help finishing drum machine....stuck

I realize SoundName is displayed nine times since I’m mapping, but I can’t figure out a way to display in the Drum Machine…I need some help.

7. When a .drum-pad is triggered, a string describing the associated audio clip is displayed as the inner text of the #display element (each string must be unique).

my pen

I would suggest lifting the state and logic up from the MusicPads component to the parent component and passing down data and methods to the child components. That way any child component can use the functionality and “know” about the current state.

I am confused about how to even begin this.

I’ll trying reading it again.

I dont understand this.

The idea is to have all shared state and methods inside the top-level component and then pass down anything the child components needs. You are already doing some passing of props so you should understand this to some extent already. If all the functionality and data are in the top-level component you can pass down whatever you need inside the child components.

In order for one child component to know about the state of another child component, they need to share that state and because you can not pass state up the component tree you have to lift the state up as high as needed for the child components to have access to the state/methods.

Here is a video that might help explain it

I’ve now watched the video, but this isn’t working for me.