We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5733044 commit 0bf49c5Copy full SHA for 0bf49c5
src/js/packages/@reactpy/client/src/vdom.tsx
@@ -309,7 +309,15 @@ class ReactPyChild extends HTMLElement {
309
310
try {
311
const bind = await loadImportSource(newImportSource, this._client);
312
- if (this.isConnected) {
+ if (
313
+ this.isConnected &&
314
+ this.currentImportSource &&
315
+ isImportSourceEqual(this.currentImportSource, newImportSource)
316
+ ) {
317
+ const oldBinding = this.binding as ImportSourceBinding | null;
318
+ if (oldBinding) {
319
+ oldBinding.unmount();
320
+ }
321
this.binding = bind(this.mountPoint);
322
if (this.binding) {
323
this.binding.render(this._model);
0 commit comments