Automatically bind ES6 class functions in callbacks in React
December 22, 2019 — When using React component using ES6 classes, you must have encountered this phenomenon where you have to explicitly bind the class function and then pass it to the even such as onClick
. For instance, take the following example.