📜  react admin newrecords.foreach 不是函数 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:54.360000             🧑  作者: Mango

代码示例1
The problem is due to your data sample format, in that case your API respose it is an object, but it need to be an array instead. Like this:

[
     { id: 126, title: "allo?", author_id: 12 },
     { id: 127, title: "bien le bonjour", author_id: 12 },
     { id: 124, title: "good day sunshine", author_id: 12 },
     { id: 123, title: "hello, world", author_id: 12 },
     { id: 125, title: "howdy partner", author_id: 12 }
]