Meteor Deep Dive
Reactive Programming With Tracker
How does the magic happen?
Warning
This is not the entry level
What is Tracker?
Reactive Programming
a = b + c
How does Tracker do RP?
How does Tracker work its magic?
Observer pattern
Publish/subscribe pattern
Let's dive into the code
The flow of Tracker
- Tracker.autorun
- new Tracker.Computation (call this C)
- C sets itself as the global currentComputation and runs for the first time
- Subject.depend() is call and add C to its dependents list
- Subject.change() will lookup and rerun all dependent computations