Try this exercise. Click the correct answer from the options.
What is the syntax for assigning an event handler function to the onClick
event in React?
Click the option that best answers the question.
- handleClick={handleClick}
- onClick={handleClick}
- onClick: handleClick
- onClick(handleClick)