re: Using arrow function to define a method VIEW POST

re: Are the following statements correct? Never define methods in an object literal via arrow-function. It's fine to define methods in a Class via ar...

I think it's more important to be consistent. If you are using arrow functions to define Class methods, then all class methods should be arrow functions. Similarly if you are using arrow functions for object literals then you should stick with them.

Though, for best practices I usually try to stick with the constraints you have defined. And then keep them consistent across the project.

code of conduct - report abuse