Created
April 25, 2022 09:45
-
-
Save petrosDemetrakopoulos/302886b58922601487080ba30707d4ea to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import TableList from './TableList' | |
import './App.css' | |
import axios from 'axios' | |
function App() { | |
const [users, setUsers] = React.useState([]) | |
React.useEffect(() => { | |
axios | |
.get(`https://mockapiID.mockapi.io/users`) | |
.then((res) => { | |
setUsers(res.data) | |
}) | |
}, []) | |
return ( | |
<div className="App"> | |
<TableList data={users} /> | |
</div> | |
) | |
} | |
export default App |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment