본문 바로가기

React

useEffect console.log undefined

반응형

구글 검색 - useeffect console.log undefined

 

https://stackoverflow.com/questions/58934643/fetching-data-in-reacts-useeffect-returns-undefined

 

Fetching data in React's useEffect() returns "undefined"

I'm trying to fetch data from a database. It's a get request. All works fine as long I am using the fetched data in the async function. But ouside of it, it just returns "undefined". What am I doing

stackoverflow.com

 

Fetching data in React's useEffect() returns “undefined”

 

useEffect를 하나 더 써서 해결하는 방법이다

 

반응형