title: Element is undefined because it is not rendered yet. How to wait for it?
body: <p>In my Vue app I have an image element with a bound src. this code is in a stepper. In one step the user selects a picture to upload an in the next step the image gets shown (which works as intended). However I am trying to initiate a library on the element in the next step (the Taggd library) but the element seems to be undefined. </p>
  
  <p>I tried the nextTick() to wait for the image to load but without luck. </p>
  
  <p>the image element:</p>
  
  <pre><code>&lt;div class="orientation-landscape"&gt;
      &lt;div class="justify-center q-px-lg"&gt;
          &lt;img v-if="photo.url" :src="photo.url" id="workingPhoto"
          style="width: 80vw;" ref="workingPhoto"/&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The functions. I first use uploadFile to set the url of the image element and go to the next step where the image will be loaded. then I call initTaggd() on the nextTick however that fails because the element is undefined. </p>
  
  <pre><code>uploadFile(file) {
    const self = this;
    self.photo.file = file;
    self.setPhotoUrl(file);
    self.$refs.stepper2.next();
    console.log('We should be at next step now. doing the init');
    self.nextTick(self.initTaggd());
  },
  
  setPhotoUrl(file) {
    const self = this;
    self.photo.url = URL.createObjectURL(file);
    console.log('ping1');
  },
  
  initTaggd() {
    const self = this;
    const image = document.getElementById('workingPhoto');
    console.log('image:', image);     //THIS RETURNS UNDEFINED
    console.log('Trying ANOTHER element by refs:', self.$refs.stepper2);     // This returns the element
    console.log('trying the real element by reference', self.$refs.workingPhoto);     // Returns undefined again
    const taggd = new Taggd(image);      //All this here fails because image is undefined.
    console.log('ping2.5');
    taggd.setTags([
      self.createTag(),
      self.createTag(),
      self.createTag(),
    ]);
    console.log('ping3');
  },
  </code></pre>
  
  <p>I think I am looking for a way to wait for the image to fully load before calling initTaggd() but I am lost on how to achieve this.</p>