@uhl7792/react-use-quote-of-the-day
Pulls the quote of the day from quotes.rest api
Install
npm install --save @uhl7792/react-use-quote-of-the-day
Usage
import React, { Component } from 'react'
import { useMyuseQuoteOfTheDayHook } from '@uhl7792/react-use-quote-of-the-day'
const App = () => {
const [quote, loading] = useMyuseQuoteOfTheDayHook()
if (loading) {
return <h2>...loading</h2>
} else if (quote) {
return (
<h1>
{quote}
</h1>
)
}
return null;
}
License
MIT © danieluhl
This hook is created using create-react-hook.