Consider the following example:
const foo = string => "bar" + string;
class Example extends React.Component {
foo = string => "bar" + string
render = () => <p>
{foo("asd"); this.foo("asd")}
</p>
}
The only thing that I thought about is that a function inside the component's body can access it's attributes such as props, state, and anything inside the body including functions, but we can pass them as the outer function's parameters as well. So is this the only "advantage or disadvantage" of this, or there's something more advanced?