ParseReact
                                
                                 ParseReact copied to clipboard
                                
                                    ParseReact copied to clipboard
                            
                            
                            
                        Support count queries
Will ParseReact support Parse count queries in the observe function?
See https://parse.com/docs/js/guide#queries-counting-objects
Instead of using the count query I have been getting the length on the array of objects returned from the observe function.
observe: function() {
   return {
      comments: (new Parse.Query('Comment')).ascending('createdAt')
   }
}
render: function() {
   //get count of your return data
   console.log(this.data.comments.length);
  ...
}
@mikemintz We've been trying to work out a decent way to expose this expanded functionality on ParseQuery. Most of the trouble is a matter of working out an ideal API. Ultimately, we need to generate a count Observable from a query, and also decide whether counts will be automatically updated by mutations. Once we have a decent proposal for the API, I think we should move forward with implementing just that bit, and we can treat local updates as improvements to be dealt with down the road.
It would be great to support count so that higher level components don't have to query for entire objects.
Can we merge #88?
Re: #88, @philikon and I were hoping to have a conversation around maintaining updated stores, but I think the consensus is that we will not dynamically update count queries for now. Hopefully we can land it in the next few days.
I finally found the time to update #88 with the changes that @andrewimm and I talked about offline.