Closed afrokick closed 5 years ago
Page title doesn't change. Computation runs only one.
Example code for Collection:
import { FlowRouter } from 'meteor/ostrio:flow-router-extra'; import { Mongo } from 'meteor/mongo'; const TestCollection = new Mongo.Collection('testColl', { connection: null }); Meteor.setInterval(() => { if (TestCollection.find({}).count()) { TestCollection.remove({}); } else { TestCollection.insert({ counter: true }); } }, 1000); Tracker.autorun(() => { const [s] = TestCollection.find({}).fetch(); console.log(`Tracker: ${s ? 'founded' : 'not founded'}`); }); FlowRouter.route('*', { name: 'App.notFound', action() { console.log('rendered'); }, title() { const [s] = TestCollection.find({}).fetch(); return s ? 'founded' : 'not founded'; }, });
Example code for ReactiveVar:
import { FlowRouter } from 'meteor/ostrio:flow-router-extra'; const test = new ReactiveVar(1); Meteor.setInterval(() => { test.set(test.get() + 1); console.log(`new:${test.get()}`); }, 1000); FlowRouter.route('*', { name: 'Test.name', action() { console.log('rendered'); }, title() { const t = test.get(); console.log(`change title:${t}`); return `count ${t}`; }, });
Env:
Hello @afrokick 👋 Thank you for your contribution, released as v3.2.0. Feel free to reopen it in case if the issue is still persists on your end.
v3.2.0
Page title doesn't change. Computation runs only one.
Example code for Collection:
Example code for ReactiveVar:
Env: