Created
September 4, 2019 21:47
-
-
Save Eth3rnit3/3a4d4f2b499f4098765b60b2927ea0ae 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 './App.css'; | |
import Uploader from './uploader'; | |
const fetchTestDatas = function () { | |
fetch('/api/v1/tests') | |
.then(res => res.json()) | |
.then((response) => { console.log("Test datas response", response); }) | |
.catch((error) => { console.log("Error while fetching test datas", error); }) | |
} | |
function App() { | |
return ( | |
<div className="App"> | |
<button onClick={fetchTestDatas}> | |
Fetch Test Datas | |
</button> | |
<Uploader /> | |
</div> | |
); | |
} | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment