title: Method that includes fetch wont change the value of an object
body: <p>A method that contains a fetch API call, wont update the user object</p>
  
  <p>I have a login component witch is only active if the object user is null.
  The login button activates the method  witch activates a fetch with a put request, and gets data back from my back-end. The API call works and gets the wanted data, but when i try to update my object it stays null, so my login component wont disappear.</p>
  
  <p>this is the login component that needs to disappear when the object user updates</p>
  
  <pre><code>&lt;template&gt;
    &lt;div&gt;
      &lt;div v-if="user === null"&gt;
      &lt;Login class="login" v-on:check-user="checkUser"/&gt;
      &lt;/div&gt;
  
  
  
    &lt;/div&gt;
  &lt;/template&gt;
  </code></pre>
  
  <p>This is where i initialize the user object and the method that is suppose to update the said object.
  the alert returns the whole object as it should be but the login component isn't disappearing</p>
  
  <pre><code> data(){
      return{
        user: null,
        coupons:[],
        shops:[],
      }
    },
    methods:{
      checkUser(mak){
        alert(this.user);
        fetch("http://localhost:8080/kupom/kupoman/user", {
              method: "PUT",
              headers: {
              "Accept": "application/json",
              "Content-Type": "application/json"
              },
              body: JSON.stringify(mak)
          })
              .then(response=&gt; {
              return response.json();
  
  
            })
            .then(data=&gt;{
              this.user=data;
              alert(JSON.stringify(this.user));
            });
        },
  </code></pre>