An example will better illustrate my question.
let obj = {
columns: [
{ column: name },
{ column: name },
{ column: name },
{ column: name },
{ column: name }
],
someFunc: () => {
this.somePublicFunc(this.columns[0])
}
}
With a regular function() the this.columns would point to obj.columns. Is there a way at access the function this scope within a fat arrow function?
Alternatively can I call a public function in a non-fat arrow function?
someFunc: function() {
this.somePublicFunc(this.columns[0])
}
Edit: I know I can access obj.columns, but was looking for other options as this is not the most elegant option for the actual code.
Edit: This was all the result of quickly changing all the public methods over to arrow functions. The thought never even occurred to me to just change the problem method in question to a traditional non fat arrow function. Problem solved, ego bruised.