Functions inside Tracker.autorun()


#1

Hi, I have a function inside tracker.autorun() like this:

Tracker.autorun(function() {
    function getproduct() {...};
});

I want to use getproduct() in another place in the same file. How do I reference the function? In general, how do I reference any result from Tracker.autorun()?


#2

You can declare the function outside the tracker. Tracker will still find the reactive variables.