<Fab raised="true" size="small" color="primary" variant="extended"
onClick={props.Store.fetchFromServer}
and
this.fetchFromServer = async () => {
await console.log('test')
}
works fine.
But when changed to following
<Fab raised="true" size="small" color="primary" variant="extended"
onClick={props.Store.fetchFromServer('test')}
and
this.fetchFromServer = async (val) => {
await console.log(val)
}
throw following error, what I am missing?
Failed prop type: Invalid prop `onClick` of type `object` supplied to `ButtonBase`, expected `function`
this did not help much Failed prop type: Invalid prop `onClick` of type `object` supplied to `Button`, expected `function`