The list of properties on the doc doesn't include onClick
(http://www.material-ui.com/#/components/icon-button)
How do I know I need to use onClick for click handler?
The Material-UI documentation does not list the standard React (native browser) events:
https://facebook.github.io/react/docs/events.html#mouse-events
This is because it's expected that you are already aware of the available native events. For example, you can also use onWheel
. It would be a long and redundant list if all the native events were included.
As kouak explains, other props (such as onClick
) are passed down to a relevant child component.
Random example:
<Button color="primary" onClick={() => { console.log('onClick'); }}>
Primary
</Button>