Open Guro opened 9 years ago
I don't think it's possible to observe a single object. What I do is that I have a Query that does what yours is doing. Then I have function that returns my object.
getPost() {
return this.data.post[0];
}
With that I can also easy check if my post has been fetched or not by just checking if getPost
returns anything.
But I think it would be a good feature if you could subscribe to a single object!
+1 on getting a single object. I've been pulling in single objects using the regular Parse SDK which works fine, but the object you get back isn't compatible with ParseReact mutations. For instance, you can't update an object like this:
var mutation = ParseReact.Mutation.Set(myParseOb, event);
More on the issue I'm talking about here: https://github.com/ParsePlatform/ParseReact/issues/45
Hello im trying to select single object not an array of objects, how that is possible? as a parse javascript sdk docs says, it must be done using .first(), but i cant implement it in parseReact.
my query looks like this:
but it selects array with 1 object, adding .first() at the and returns nothing