Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 530 Bytes

useHelloRomanJoke.md

File metadata and controls

32 lines (23 loc) · 530 Bytes

useHelloRomanJoke

Get random joke directly from Hello Roman

Usage

import { useHelloRomanJoke } from 'use-haki';

const App = () => {
  const { position, isResolved } = useHelloRomanJoke();

  return (
    <section>
      <h1>{randomQuestion}</h1>
      <p>{randomAnswer}</p>
    </section>
  );
};

Reference

const [randomQuestion, randomAnswer] = useHelloRomanJoke();

Returns

  • randomQuestion
  • randomAnswer
  • error