Why aren't the buttons showing up?

Hey, I’m doing the drum machine project.

The simple code is here: https://codepen.io/caiosa/pen/mdRJGZb

I’m on the first part:
Showing all buttons and associating a sound to them when clicked through a function.
It doesn’t say there’s an error anywhere and I also the buttons are showing up!

I put the boostrap library into the project already and its working, but for buttons - it’s not.

Could someone help me?

Hi,

You have some syntax error.

  1. React Component need to be capitalize, like class Playsound.
  2. Don’t use const for private function inside class and move it outside constructor, and you can refer to it with this.playIt
  3. clilps in Playsound should be coming from this.props. So reference it to this.props.clips
  4. don’t forget to bind your function ( I forget how to do this in Class component)

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.