我试图让我的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?