Skip to content

Instantly share code, notes, and snippets.

@koss-lebedev
Created June 8, 2019 17:14
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save koss-lebedev/9799a5df0b01a0a889b2140fc0ee7514 to your computer and use it in GitHub Desktop.
Save koss-lebedev/9799a5df0b01a0a889b2140fc0ee7514 to your computer and use it in GitHub Desktop.
import * as React from "react"
import { Quote } from "./canvas"
export function KanyeQuote() {
const [quote, setQuote] = React.useState("")
React.useEffect(() => {
fetch("https://api.kanye.rest/").then(response => {
response.json().then(json => {
setQuote(json.quote)
})
})
}, [])
return <Quote text={quote} />
}
@mu3
Copy link

mu3 commented Aug 16, 2019

return <Quote text={`"${quote}"`} author={`- Kanye West`} />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment