-
-
Save yasudacloud/19f6862f09308b04ad87f9c6302f767d to your computer and use it in GitHub Desktop.
This file contains 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 * as api from './http/api' | |
function App() { | |
const onClick = async () => { | |
const client = api.DefaultApiFactory(undefined, 'http://localhost:8000') | |
const response = await client.rootGet() | |
console.log(response.data) | |
} | |
return ( | |
<div className="App"> | |
<div style={{margin: 100}}> | |
<button onClick={onClick}>APIを叩く</button> | |
</div> | |
</div> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment