When I console.log the parameters of handleClick i get the message in inspect element (console section) this message.
{ "dispatchConfig": null, "_targetInst": null, "nativeEvent": null, "type": null, "target": null, "eventPhase": null, "bubbles": null, "cancelable": null, "defaultPrevented": null, "isTrusted": null, "view": null, "detail": null, "screenX": null, "screenY": null, "clientX": null, "clientY": null, "pageX": null, "pageY": null, "ctrlKey": null, "shiftKey": null, "altKey": null, "metaKey": null, "button": null, "buttons": null, "_dispatchListeners": null, "_dispatchInstances": null }
Here is the code:
export default class Button extends React.Component {
static propTypes = {
name: PropTypes.string,
orange: PropTypes.bool,
wide: PropTypes.bool,
clickHandler: PropTypes.func,
};
handleClick = (abc) => {
this.props.clickHandler(this.props.name);
console.log ( abc)
};
render() {
const className = [
"component-button",
this.props.orange ? "orange" : "",
this.props.wide ? "wide" : "",
];
return (
<div className={className.join(" ").trim()}>
<button onClick={this.handleClick}>{this.props.name}</button>
</div>
);
}
}
Why am I getting this message in console? Thanks in advance.