userid(uid){
this.state.userid.map((user)=>{
if(uid===user._id){
console.log(user.username)
return user.username
}
})
}
<div style={{width:"80%"}}>
{this.state.posts.map(post=>
<div key={post._id.toString()}>
<div className="modal-content"><br/>
<a >{this.**userid**(post.user_id)}</a>
<b>Title: {post.title}</b><br/>
<div><b>Message: </b>{post.message}</div>
我从返回渲染中调用用户id,但它没有返回,有没有办法返回