0
votes

I'm building at the moment a frontend editor. When I'm logged in, elements are getting rendered by server (laravel) and are enclosed in a renderless vue component:

<vue-element>
  <template v-slot="{ editing }">
    <div class="element">
      // other HTML
    </div>
  </template>
</vue-element>

The problem is, when I'm editing this element, css classes and other stuff are getting changed and I have to swap (morph dom) the element with a new element from the server. But when I do that, the element disappears and vue has lost track of the component.

How can I reinit the component or are there other solutions to my problem?