Multiple FuseJS/Timer created on hot reload

<App Theme="Basic">
    <JavaScript>
        var Timer = require('FuseJS/Timer');
    var timer = Timer.create(function() {
        console.log(&#39;Timer interval fired!&#39;);
    }, 5000, true);
&lt;/JavaScript&gt;
&lt;Text Value=&quot;Change me&quot; /&gt;


Change text value a couple of times to trigger reload. Somehow, the timers get “duplicated”.

Hi! Which version of Fuse is this happening on? And does it happen in local preview, on device or both?

Hi!

Sorry, this happens both in 0.10 and newest qa (0.11.0, build 6149).

I’ve only tested it in local preview though (OSX).

Tommy wrote:

Hi!

Sorry, this happens both in 0.10 and newest qa (0.11.0, build 6149).

I’ve only tested it in local preview though (OSX).

Hi Tommy,

I tried your example. Everything is working properly. Something may be wrong in your machine. (OSX, 0.11.0-build 6078)

Onur Baran wrote:

Tommy wrote:

Hi!

Sorry, this happens both in 0.10 and newest qa (0.11.0, build 6149).

I’ve only tested it in local preview though (OSX).

Hi Tommy,

I tried your example. Everything is working properly. Something may be wrong in your machine. (OSX, 0.11.0-build 6078)

Hm, strange. So if you try to change the text value 10-15 times to trigger reload, you only get one timer that fires every 5 second? I just can’t see how my computer may be an issue.

Reproduced it here (on Windows) as well. Will let you know as soon as we know more. :slight_smile:

I think I know why this happens: basically, some of our “builtin” JS modules are not reset like normal JS modules are on preview reload. Anyway, I’ve raised an issue internally and we’ll get to it as soon as we can.

Thanks for the report!