のレンダリング中にデータがこの形式である:私はこれを実行しているときエラーJSONデータ[Reactjs]
_getTags() {
console.log(this.props.tagsview);
return this.props.tagsview.map(tags => {
var newItem = tags.map(p => <span className="tag" key={p.tag_id}>{p.name}</span>);
return ({newItem);
});
}
は、だから私は取得しています:
をerror react.js:18893 Uncaught Error: Objects are not valid as a React child (found: object with keys {newItem}). If you meant to render a collection of children, use an array instead or wrap the object using createFragment(object) from the React add-ons.(…)
私は何が欠けていますか?
別の方法がありますか?