Is there a way to make Vue re-initialize itself after inserting a component fetched from an API into the DOM?
The component looks like this:
<div><My_component /></div>
This component is part of a back-end snippet.
When inserting it into HTML:
document.getElementById("something").innerHTML = "<div><My_component /></div>"
I have attempted to use the .$forceUpdate()
function, but it returned undefined and had no effect.
I am unable to get Vue to recognize the newly added component. Is there any solution to this?