Answers for "react admin newrecords.foreach is not a function"

1

react admin newrecords.foreach is not a function

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 }
]
Posted by: Guest on June-22-2020

Code answers related to "react admin newrecords.foreach is not a function"

Code answers related to "Javascript"

Browse Popular Code Answers by Language