diff --git a/src/index.js b/src/index.js index 42318d7..3e689ad 100644 --- a/src/index.js +++ b/src/index.js @@ -81,6 +81,9 @@ function connectedCallback() { { ...this._props, context }, toVdom(this, this._vdomComponent) ); + + // rendering to clear node + this.innerHTML = ""; (this.hasAttribute('hydrate') ? hydrate : render)(this._vdom, this._root); }