Skip to content

sam-b-rose/use-emoji

Repository files navigation

use-emoji

React hook for emoji related things 🎣

NPM JavaScript Style Guide

Install

npm install --save use-emoji

Usage

import React, { Component } from 'react'

import { useEmoji, useSameEmoji } from 'use-emoji'

const Example = () => {
  const randomEmoji = useEmoji()    // returns a random emoji on each rerender
  const sameEmoji = useSameEmoji()  // returns the same emoji on each rerender
  return (
    <div>{randomEmoji}</div>
    <div>{sameEmoji}</div>
  )
}

License

MIT © samrose3