は私がreact-meteor-data理解流星のサブスクリプション
import { createContainer } from 'meteor/react-meteor-data';
export default FooContainer = createContainer(() => {
// Do all your reactive data access in this method.
// Note that this subscription will get cleaned up when your component is unmounted
var handle = Meteor.subscribe("todoList", this.props.id);
return {
currentUser: Meteor.user(),
listLoading: ! handle.ready(),
tasks: Tasks.find({listId: this.props.id}).fetch(),
};
}, Foo);
からこの例を理解していないものの、この場合には、何の努力は何を停止するようになされていませんか? Meteorはサブスクリプションをどのように処理しますか?コレクションはいつ掃除されますか?トラッカーコールバックが実行されるたびにサブスクリプションがスタックアップしていますか?
Meteor.subscribe
が呼び出されているときに知っていて、サブスクリプションで魔法を覚えていれば十分ですか?
今、より理にかなっています。ありがとう! –