In React is it better to think of onClick as setting an eventListener rather than as a standard Javascript onclick attribute?
For example, consider these two code snippet