@afbroman/react-use-sw-quote

custom react hook for getting a random Star Wars quote

Usage no npm install needed!

<script type="module">
  import afbromanReactUseSwQuote from 'https://cdn.skypack.dev/@afbroman/react-use-sw-quote';
</script>

README

@afbroman/react-use-sw-quote

custom react hook for getting a random Star Wars quote

NPM JavaScript Style Guide

Install

npm install --save @afbroman/react-use-sw-quote

Usage

import React, { Component } from 'react'

import { useStarWarsQuote } from '@afbroman/react-use-sw-quote'

const Example = () => {
  const example = useStarWarsQuote()
  return (
    <div>{example}</div>
  )
}

License

MIT © afbroman


This hook is created using create-react-hook.