What is the difference between
displayFunction() {
console.log('test')
}
and
const displayFunction = () => {
console.log('test')
}
I code in Angular a bit and saw the first way of defining methods all the time. However, React seems to prefer the second way.