Meteor Tracker Autorun and dependcy学习笔记

 Tracker, tracker-menual

Tracker.autorun 数据类型

Session variables

Database queries on Collections

Meteor.status

The ready() method on a subscription handle

Meteor.user

Meteor.userId

Meteor.loggingIn

ReactiveVar

ReactiveDict


定制自己的autorun

```javascript

myDep=newTracker.Dependency();

Tracker.autorun(function(comp){

     myDep.depend();

     console.log("Something has happened!");

});

```

在需要自动运行 autorun --> console.log("something has happened!")的地方调用myDep.changed();

zzz~~~

你可能感兴趣的:(Meteor Tracker Autorun and dependcy学习笔记)