Error Blog
This blog is about the error Error: Objects are not valid as a React child
Problem Statement
error on start of reactjs application
Error Details
error Log
ERROR DETAILS
Error: Objects are not valid as a React child (found: object with keys {TASK_ID, TASK_DESC, TASK_REF, TASK_STATUS, UPDATED_ON}). If you meant to render a collection of children, use an array instead. in div (at task-list.js:22) in TaskList (at App.js:10) in div (at App.js:9) in App (at src/index.js:9) in StrictMode (at src/index.js:8)
Error Code
You will face this error if you try to convert an array response to json .
Solution
change the code so that the array is handled .
Code Changes
wrap the array inside a json .
OUTPUT
works
Thanks for reading . Let me know your thoughts in the comments below .
No comments:
Post a Comment