Skip to content

Harshmakadia/use-lorem-ipsum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

use-lorem-ipsum

React Hook for generating random lorem ipsum words, sentences, paragraphs

NPM JavaScript Style Guide

Install

npm add use-lorem-ipsum

Signature

const message = useLoremIpsum(type, count);

Props

Name Type Required Default value Description
type string yes - specify one from words, sentences, paragraphs
count number optional 1 specify number of times the type should be repeated

Example

Codesandbox Demo 📦

Usage

import React from 'react'

import { useLoremIpsum } from 'use-lorem-ipsum'

export default () => {
  const message = useLoremIpsum("words", 2);

  return (
    <div>
      Hello {message}
    </div>
  );
}

Demo

Demo

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Harsh Makadia

💻 🎨 🤔

This project follows the all-contributors specification. Contributions of any kind welcome!

License

© HarshMakadia