Self review: Dynamic events - React Basic

Self review: Dynamic events - React Basic

  1. In React, you are not allowed to code a separate function that should be run to handle a click event.

    • True

    • False

  2. Event-handling attributes in React are named almost the same as in HTML. Syntactically, the only difference is in the capitalization.

    • True

    • False

  3. What's wrong with this code?

     <button onClick={handleClick()}>
       Click me
     </button>
    
    • This code should work.

    • You cannot invoke an event-handling function from a JSX expression.

    • The event-handling attribute should be all lowercased.