@uhl7792/react-use-quote-of-the-day

1.0.0 • Public • Published

@uhl7792/react-use-quote-of-the-day

Pulls the quote of the day from quotes.rest api

NPM JavaScript Style Guide

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @uhl7792/react-use-quote-of-the-day

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

124 kB

Total Files

21

Last publish

Collaborators

  • uhl7792