# Glimmer Component Change Detection Not Working - Mutating Properties in @tracked Array

**URL:** <https://meta.discourse.org/t/glimmer-component-change-detection-not-working-mutating-properties-in-tracked-array/378246>\
**Category:** Development\
**Created:** [August 12, 2025, 5:45am UTC](https://meta.discourse.org/t/glimmer-component-change-detection-not-working-mutating-properties-in-tracked-array/378246 "2025-08-12T05:45:09Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Alteras](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alteras/32/179824_2.png) [@Alteras](https://meta.discourse.org/u/Alteras)\
**Post date:** [August 14, 2025, 5:13pm UTC](https://meta.discourse.org/t/glimmer-component-change-detection-not-working-mutating-properties-in-tracked-array/378246/6 "2025-08-14T17:13:19Z")

</div>

You can use `loadScript()` to load JS, even if the URL provided is an external URL. Using external services like jsdelivr should work with this.

```js
import loadScript from "discourse/lib/load-script";

...

loadScript(URL).then(() => {
   // your code
})

```

Though I haven’t tested it extensively, a [dynamic import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import) should also work.

```js
async function load() {
  const {
    default: myDefault,
    foo,
    bar,
  } = await import(URL);
  // rest of code
}

```

I should note that it is probably safer to save the NPM files directly into your code instead of relying on an external CDN, depending on how critical the JS is. Similarly, you may need to do a bit of bundling and preprocessing before being able to use it in the browser.

* * *

As for whether Immer will work with discourse, I don’t know.

---

_[View the full topic](https://meta.discourse.org/t/glimmer-component-change-detection-not-working-mutating-properties-in-tracked-array/378246)._
