Why does React use className over class attribute?

Question
  • class is a keyword in javascript and JSX is an extension of javascript.
  • That’s the principal reason why React uses className instead of class.

    render() {
    return <span className="menu navigation-menu">Menu</span>
    }

3 years 2021-08-07T06:16:39+00:00 19 views 0

Leave an answer

Browse
Browse