My dilemma is over which option would be quicker. Should I instantiate a new object from a class and use that, or should I utilize a class with static methods?
export default class AuthServices {
static async login (data) {}
static async register (data) {}
}
The code above demonstrates the use of static methods where I can access the login
and register
functions by invoking the class name first. However, I wonder if I should eliminate the static keyword and instead create an object within the file that will call these functions.