我正在尝试映射一组对象,但它一直说文档未定义,即使我可以在 console.log 中清楚地看到它
这就是我在console.log时得到的
{console.log(this.props.results.data)}
我想要的是在文档领域。如果我展开它看起来像这样
由于我想打印出文档的内容,这就是我尝试做的
<div className='list-render'>
{this.props.results.loading ? <LoadingSpinner/> :
<div className='row'>
{(this.props.results.data.docs.map((data) => { // code to print individual fields )}
</div>
</div>}
</div>
我得到TypeError: this.props.results.data.docs is undefined我正在使用mongoose -paginate-v2 库进行分页

