我持有非持久数据,调用api(Meteor.method)它应该显示项目列表(文本)但屏幕上没有任何内容
if(Meteor.isClient) {
Searches = new Meteor.Collection('searches');
Meteor.subscribe('allSearches');
console.log(Searches.find());
}
...
renderTasks(){
return this.data.searches.map((searches, i) => {
return <SearchResultItem key={i} searches={searches} />;
});
},
...
<ul>
{this.renderTasks()}
</ul>
...
SearchResultItem = React.createClass({
render(){
return
<li >
{this.props.searches}
</li>
}
});