List rendering :
In React, rendering lists is a common task. You can render lists using
JavaScript's map() function to iterate over an array of data and return an
array of React elements.
[Link]
Axios :
Axios is a popular JavaScript library that allows you to make HTTP
requests from a browser.
It's often used in React applications to interact with APIs or to
send/receive data.
Axios supports other HTTP methods like POST, PUT, DELETE, etc.
You can use [Link](), [Link](), [Link](), etc., similarly to
how we used [Link]().
Axios returns a promise, so we need to resolve that.
Ex :
[Link]
import React from 'react'
import axios from "axios"
import { useEffect } from 'react'
import { useState } from 'react'
const App = () => {
let [state, setState] = useState([])
let getApi = async () => {
let {data} = await [Link]("[Link]
setState(data)
useEffect(() => {
getApi()
},[])
return (
<section>
<article>
{[Link]((x) => {
return (
<ul key={[Link]}>
<li>{[Link]}</li>
<li>{[Link]}</li>
<li>
<img src={x.avatar_url} alt="" />
</li>
</ul>
)
})}
</article>
</section>
)
}
export default App