What’s the equivalent of Solid.js createEffect() (or React useEffect(), Meteor Tracker.autorun(), MobX autorun(), Vue watchEffect(), Svelte $effect(), Angular effect()) in Ember.js?
For example, in Solid.js we can log something any time some signals (similar to tracked variables in Ember) change:
createEffect(() => {
// This automatically re-runs when a, b, or c change.
console.log(a(), b(), c())
})
And similar with other mainstream frameworks. It isn’t obvious from the docs how to do this.
Similar topic: Is there a way to a change in a tracked property fire a function - #3 by pabloascarza
2 posts - 1 participant