# Subscribe to change on observable inside a module.

**URL:** <https://forums.fusetools.com/t/subscribe-to-change-on-observable-inside-a-module/6150>\
**Category:** How-to Discussions\
**Created:** [May 12, 2017, 11:09am UTC](https://forums.fusetools.com/t/subscribe-to-change-on-observable-inside-a-module/6150 "2017-05-12T11:09:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Palton](https://avatars.discourse-cdn.com/v4/letter/p/3d9bf3/32.png) [@Palton](https://forums.fusetools.com/u/Palton)\
**Post date:** [May 12, 2017, 11:09am UTC](https://forums.fusetools.com/t/subscribe-to-change-on-observable-inside-a-module/6150/1 "2017-05-12T11:09:18Z")

</div>

What is wrong with this picture… I have a module that manages the content fetched from an API. I would like the UX to be updated whenever the content is fetched and the content observable updated with the new content. My problem is that every time I fetch the content, and the content is passed into the content observable, the UX doesnt get updated with the values. Each is allways empty.

MyModule.js

```auto
var Observable = require('FuseJS/Observable');
var content = new Observable();

function fetchContent(){
   //...fetch something then set the content into content using content.replaceAll(items)....
}

module.exports = {
    content: content,
    fetchContent: fetchContent,
}

```

myUx.ux

```auto
<JavaScript>
var myModule = require('MyModule')

myModule.fetchContent();

module.exports = {
      contentFromModule : myModule.content,
}
</JavaScript>
...
<Each Items="{contentFromModule}">
     <!-- Do something with each item -->
</Each>
...

```

---

<div class="post-metadata">

**Author:** ![Uldis](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/uldis/32/657_2.png) [@Uldis](https://forums.fusetools.com/u/Uldis)\
**Post date:** [May 12, 2017, 11:17am UTC](https://forums.fusetools.com/t/subscribe-to-change-on-observable-inside-a-module/6150/2 "2017-05-12T11:17:42Z")

</div>

Hi Palton,

the code you’ve posted appears to be just fine. We’ll need to see more of the code to help.

Have you tried adding `console.log()`s all over the place to make sure everything gets called?

---

<div class="post-metadata">

**Author:** ![Palton](https://avatars.discourse-cdn.com/v4/letter/p/3d9bf3/32.png) [@Palton](https://forums.fusetools.com/u/Palton)\
**Post date:** [May 12, 2017, 11:26am UTC](https://forums.fusetools.com/t/subscribe-to-change-on-observable-inside-a-module/6150/3 "2017-05-12T11:26:39Z")

</div>

Thank you Uldis!

Not shure what happened, but restarting Fuse did the trick.

Keep up the good work! 🙂
