I want to read the onClick event value properties. But when I click on it, I see something like this on the console:
SyntheticMouseEvent {dispatchConfig: Ob
There are 3 ways to handle this :-
Bind the method in constructor as :-
export class HeaderRows extends Component {
constructor() {
super();
this.handleSort = this.handleSort.bind(this);
}
}
Use the arrow function while creating it as :-
handleSort = () => {
// some text here
}
Third way is this :-
that.handleSort} >{column}