However on a refresh of the page, everything works fine after.
I’ve not written anything to unsubscribe to the collection. Apart from the above issue, my data seems to be rendering reactively (from my untrained eye). Any help would be appreciated, thank you!
The action then attempts to subscribe to ‘boards’. I’m using an async function because of redux-thunk where I supposedly dispatch a payload after receiving data from the subscription
In my server
if (Meteor.isServer) {
Meteor.publish('boards', function (userId) {
if (!this.userId) {
console.log(`Failed to Publish`)
return []
} else {
console.log(`Publish Success`)
return Boards.find({ users: userId })
}
})
}
I am successfully publishing immediately after a login, but I cannot get the subscription to return “true” in Tracker.autorun() unless I do a refresh of the page where I then see the “false” followed by a “true”.