@arturonavarro/use-star-wars-quote
v1.0.0
Published
>
Downloads
2
Readme
@arturonavarro/use-star-wars-quote
Install
npm install --save @arturonavarro/use-star-wars-quote
Usage
import React from 'react'
import { useStarWarsQuote } from '@arturonavarro/use-star-wars-quote'
const Example = () => {
const { quote, loading } = useStarWarsQuote();
if (loading) return <p>Loading...</p>;
if (quote) {
return (
<h1>
{quote}
</h1>
);
}
return null;
}
License
MIT © Arturo
This hook is created using create-react-hook.