Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Multi-view SVG - Huh?

I finally got around to looking at the Fitbit multi-view SVG example, and after playing with it a little I feel like I'm missing something. I sort of understand having different views and being able to load and unload different elements for memory management, but structurally I'm a little lost. If I have a core function (that needs to run continuously no matter the current view) that say gets my heartrate every 3 minutes and does something with it, does that go in the index.js and will continue to run even if I switch views?  I did a small test of just increasing value by 5 every 10 seconds using setInterval and placed it in the index.js for one test and then in view1.js in a second test. In both cases the value increments as fast as it can - goes berserk and freezes Fitbit Studio - ignoring the interval time.  Also some more information on what goes in the OnMount function versus outside of it would help.  

Best Answer
0 Votes
0 REPLIES 0