小编Chr*_*fer的帖子

如何在响应中加载AJAX

我试图让我的json结果进入我的反应代码

代码如下所示

_getComments() {

 const commentList = "AJAX JSON GOES HERE"

return commentList.map((comment) => {
  return ( 
           <Comment
           author={comment.author}
           body={comment.body}
           avatarUrl={comment.avatarUrl}
           key={comment.id} />);
  });
}
Run Code Online (Sandbox Code Playgroud)

我如何获取AJAX?

ajax reactjs

6
推荐指数
1
解决办法
2万
查看次数

标签 统计

ajax ×1

reactjs ×1