Help with my react

I think I’m missing an error or not using React properly? Why is my content not rendering?

@brandenhintz Your code pen is just a starting template. You need to save the pen first.

What does the browser console show? Are there any errors?

nope, no errors in the console from my code. Just nothing.

You will need to post a link to a pen that actually has content. The one you originally supplied does not have any code.

Wow… sorry. Here is the correct link;

@brandenhintz You have three issues I see right off the start:

  1. You try to declare a function inside the class:
function act(n){
  const text = sounds[n];
  const sound = clips[n];
    return {display: text}
  const clip = new Audio(sound)  

I think you meant to create method here, so correct that.

  1. There is no such method class ReactDom. You have a small typo here. Fix that and something will render.

  2. You display the name of the sound to the display, but you can not see it, because it has the same color text as the color of the display background.

1 Like