score:0
Seems like the problem is not in this component. According to the error, you are passing into JSX some object (found: an object with keys {popularity, vote_count, ... ). You cant pass plain objects into JSX. Try to verify where you are passing some data into JSX and verify its type. Only strings, numbers, null, boolean, and arrays are allowed, but elements of array should be ReactNode or some primitives
score:0
try this to return an array of objects
useEffect(() => {
fetch(
`https://api.themoviedb.org/3/discover/movie?
api_key=${APP_KEY_MOVIE}&language=en-
US&sort_by=popularity.desc&include_adult=false&include_video=false&page=1`
)
.then((response) => response.json())
.then((data) => {
let res = data.result
res = res.map(item => {
const { ...release_date} = item
return {...release_date}
})
setMovies(res);
console.log(Movies);
})
.catch((err) => console.error(err));
},[]);
Source: stackoverflow.com
Related Query
- Objects are not valid as a React child - Cannot resolve error
- Objects are not valid as a React child getting error when adding div?
- Handling error in React with Formik: Objects are not valid as a React child
- Error Objects are not valid as a React child (found: Invalid date)
- React error saying Objects are not valid as react child
- Objects are not valid as a React child error when giving value to react-select
- React setState error -> Objects are not valid as a React child
- React Objects are not valid as a React child error
- Objects are not valid as a React child Error in next js
- Error in map function / Objects are not valid as a React child / React.js
- react map returned error of Objects are not valid as a React child
- Objects are not valid as a React child error in React Datatable
- TypeError: Cannot read property 'map' of undefined in ReactJs AND Error: Objects are not valid as a React child
- Objects are not valid as a React child - Confusing Error
- Getting Error Like Objects are not valid as a React child In ReactJs
- React Axios fetch response with error Objects are not valid as a React child
- I AM HAVING ERROR WHEN TRYING TO MAP A DATA IN REACT . Objects are not valid as a React child (found: object with keys {children}), How do i solve it?
- What is causing this error - Objects are not valid as a React child (found: object with keys {id, task})
- React: Cannot Import a Module Based on an If Statement: Objects are not valid as a React child (found: [object Promise])
- Getting error Objects are not valid as a React child
- Objects are not valid as a React child with state while rendering error
- REact error Objects are not valid as a React child (found: [object Promise]). If you meant to render a collection of children, use an array instead
- Getting a Objects are not valid as a React child error even though I am not trying to render an object
- Trying to add an array of objects using react useState but getting the error 'Objects are not valid as a React child (found: object with keys {})'
- Handling error Objects are not valid as a React child
- Passing an array of object to useState throws this error Objects are not valid as a React child (found: object with keys {id, name})
- getting error about objects are not valid as a React child
- Objects are not valid as a React child error in Datatable
- Objects are not valid as a React child -> Build time error -> next js typescript
- Objects are not valid as a React child (found: [object Promise]). If you meant to render a collection of children, use an array instead. error
More Query from same tag
- onChange setState is rerendering all components?
- Styling a component passed by props with emotion in react
- How do I delete an image when I delete the post or the structure that contained it, with multer?
- how to pass parameter in (translation) string
- How do I extract data from a string into a 2d array?
- How to customize only one option from react-select?
- Gatsby Starter Blog images not loading
- How do you define a type which could be any subtree of an object recursively?
- Axios error handler message with async/await in the react
- Authenticated request to passport local pending
- React Native, change React Navigation header styling
- Why my autocomplete input is not working?
- Using a checkbox with Material UI to change the boolean value of an attribute within redux
- ReactJS: How can I create multi-level array using Map
- Clicking same item closes menu but different item keeps menu open
- Batching actions in redux-saga
- How to compress build with/without ejecting create-react-app. Also include compressed file into script tag into index.html
- unable to display only year in react datepicker
- ReactJS Material UI withStyles incl. theme in TS
- How do I add more number of rows at a time?
- How to improve performance when detecting multiple outside click event listener in React Hooks
- how to use a object key with " - " in the middle
- Unsorted table data is rendered along with sorted data in table
- React apollo default query variable from redux store
- How to use Axios with async/await syntax in react?
- Flux: should not-top-level views be "dump" (do not fetch data from stores)
- wrapping text disappearing after giving overflow hidden
- How to fill an 2D array with a 2D Smaller array in JavaScript
- Passing image object as props in TypeScript
- How to inject/pass attributes to nested elements