I am building a Parse-React-Ratchet App and I am running into an unfamiliar error "Uncaught TypeError: Cannot call a class as a function" in the browser console. The error message is rooted in class-call-check.js in the node-module babel-runtime. I am attempting to create a list of businesses that are of a specific business category. The business category is stored as a pointer in the business table like this (Pseudocode)
Business {name, phone, category}
The components observe function looks like this
observe(props,state){
return{
businesses: new Parse.Query('Business').equalTo('category', Parse.Object('_BusinessCategory', { objectId: this.props.categoryId}))
}
}
I am passing the category Id from a BusinessList component like this
<div className="content">
<BusinessList categoryId={this.props.categoryId}/>
</div>
Which itself is being passed the categoryId from its parent like this
router.addRoute('categories/:id', function(id) {
this.setState({page: <CategoryPage categoryId={id}/>});
}.bind(this));
in the parents componentDidMount function. I suspect that my query is not written correctly considering I am trying to access a pointer in the query filter
Thank u in advance for your help.