1

Can anyone explain why this happen and how can I fix it?

HERE's AN ERROR

Because I really don't know what cause this error.

Thanks!!

mousetail
  • 7,009
  • 4
  • 25
  • 45
JustAkid
  • 93
  • 1
  • 8
  • 3
    Have you tried doing what the error says? Replacing `class` with `className` as react requires? – mousetail Jun 20 '22 at 12:40
  • In HTML there is an attribute `class`. If you wish to reference that attribute directly in javascript, use the reference `className`. – Rounin Jun 20 '22 at 12:41
  • In React's JSX part you're writing "HTML" but directly inside a script. And `class` is a reserved word / keyword. Therefore in JSX you use [`className`](https://reactjs.org/docs/dom-elements.html#classname) instead, exactly like the warning says. –  Jun 20 '22 at 12:41

0 Answers0