1.0.1 • Published 4 years ago

@rickbrown/use-star-wars-quote v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

@rickbrown/use-star-wars-quote

a custom React hook the provides a random quote from the star wars films. NPM JavaScript Style Guide

Install

yarn add @rickbrown/use-star-wars-quote

Usage

import React from 'react';
import { useStarWarsQuote } from '@rickbrown/use-star-wars-quote';

const App = () => {
  const { quote, loading } = useStarWarsQuote();
  return <div>{loading ? <p>loading..</p> : <p>{quote}</p>}</div>;
};

export default App;

License

MIT © RickBr0wn


This hook is created using create-react-hook.

1.0.1

4 years ago

1.0.0

4 years ago