[Vuejs]-Computed Property + Show/Hide DIV

0👍

According to the docs

A computed property will only re-evaluate when some of its reactive dependencies have changed

By saying that in your fnc findLoginProvider you need to change reactive variable to fire showFindLoginProvider run

findLoginProvider() {
  this.isLoading = true;
  UserService
    .getLoginProvider(this.email)
    .then((response) => {
      if (response?.status === 200) {
        // will tell computed to run
        this.isLoggedIn = true
        // rest of your code
      } else {
        this.isError = "Error retrieving login provider";
      }
    });
  this.isLoading = false;
},

Leave a comment