README
@alexberlo/use-star-wars-random-name
a custom react hook that provides a random star wars character name
Install
npm install --save @alexberlo/use-star-wars-random-name
Usage
import React from "react";
import { useStarWarsQuote } from "@alexberlo/use-star-wars-random-name";
const App = () => {
const { quote, loading } = useStarWarsQuote();
return loading ? <p>Loading...</p> : <div>{quote}</div>;
};
export default App;
License
MIT © AlexBerlo
This hook is created using create-react-hook.