I am migrating my vue application in react. While migrating, i am not able to understand to handle event listeners attribute of vue in react application.
Here is my vue code:
<template>
<button class="line-break" :class="buttonClass" :style="buttonStyle" v-on="cListeners"
:tabindex="disabled?-1:0">
// other code
</button>
</template>
In computed properties, i am declare the event listner function like this
cListeners() {
if(this.loading || this.disabled) { // these are props
return null;
} else {
return this.$listeners; // how to do change this pattern in react
}
},
I don't have much expertise in react. Please suggest me on this part