useEffect w/ Axios API Call

PHOTO EMBED

Wed Aug 09 2023 01:42:34 GMT+0000 (Coordinated Universal Time)

Saved by @thecowsays #react.js

useEffect(
  () => {
   axios.get(``)
    .then(res => {
     console.log(res)
   })
    .catch(err => console.log(err))
  }
)
content_copyCOPY

Basic API call using Axios within a useEffect