Hello,
Is it possible inside a autorun function to know what reactive variable triggered it ?
Thanks,
Mickael
The autorun won’t give you any information about what triggered it. So you can either keep track of past values yourself, or refactor your autoruns to have fewer dependencies.
I generally deal with this by trying to limit the reactive dependencies to one or two, so I can more easily differentiate
3 Likes
The autorun runs synchronous as I understand. You can try console.trace()
inside autorun function/
5 Likes
changed tracker.js:422
set iron_location.js:241
go iron_location.js:280
Well… the simpler the better, thanks !
1 Like
Oh that is nice!
That means looking at the call stack in the debugger works too