我有以下代码,在渲染函数中没有任何结果:
Categories:[
{
_id:"MNN2Zc4M8XnavYdiH",
name:"Test Category",
status:1
}
];
Meteor.publish('findCategory', function(id){
return Categories.find({_id:id});
});
EditCategory = React.createClass({
mixins:[ReactMeteorData],
getMeteorData(){
return{
Category:Categories.findOne({_id:this.props._id})
}
},
render:function () {
return(
<div className=""><p>{this.data.Category.name}</p></div>
)
}
});
我想显示类别名称和其他详细信息,我做错了什么?