Is there any difference between both the button click event in the given component? Which is the preferred way to write?
export default class App extends Com
From doc
The problem with this syntax is that a different callback is created each time the
Buttonrenders. In most cases, this is fine. However, if this callback is passed as a prop to lower components, those components might do an extra re-rendering.
We generally recommend binding in the constructor or using the class fields syntax, to avoid this sort of performance problem.