lfades / cottz-publish Goto Github PK
View Code? Open in Web Editor NEWEdit your documents before sending without too much stress
Home Page: https://atmospherejs.com/cottz/publish
License: MIT License
Edit your documents before sending without too much stress
Home Page: https://atmospherejs.com/cottz/publish
License: MIT License
I tried doing this:
Publish.relations(this, Posts.find({}, {sort: {points: -1}}), function (id, doc) {
doc.user = this.cursor(Meteor.users.find({_id: doc.user}));
});
to resolve the users for posts, but it results in Exception in queued task: undefined
.
I'm not sure what would be the best way to do this, I tried some of the examples in the README.md, but they all seem to be for one object only. If this is already possible, please let me know how.
My current code is:
Publish.relations(this, Posts.find({}, {sort: {points: -1}}), function (id, doc) {
doc.user = this.cursor(Meteor.users.find(doc.user))
.changeParentDoc(function (userId, user) {
return user;
});
});
When the points of a user change, my React components are not re-rendering as the data change is within the relation - if I change, e.g. the post title, it updates it fine.
Are reactive relations like this possible with this module? If yes, how would I do it?
This package is named the same as @tmeasday's, but the API seems quite different. Was it a fork initially?
Due to a bug in publish-composite (Meteor-Community-Packages/meteor-publish-composite#29 (comment)) I've been considering using this package as an alternative. However it appears to have a similar problem.
@goluis Could you please take a look at the issue linked above?
Delete it, there was no error :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.