I'm not familiar with this syntax to write a JS/ typescript function? Is there a name for this approach and I'm not exactly sure how it works or how it rewrites to a more obvious approach?
It looks like the method is calling this.updateMyField(param1, param2)
but how is something1
and something2
handled?
Code snippet
const myMethod = (param1: string, param2: string) => this.updateMyField(
something1,
param1,
param2,
something2,
);
"Standard" approach to writing a function
updateMyField = () => {
//
}
or..
updateMyField() {
//
}
Thank you