use-lorem-ipsum
v1.0.5
Published
A hook that generates LOREM IPSUM text
Downloads
1
Readme
use-lorem-ipsum
React Hook for generating random lorem ipsum words, sentences, paragraphs
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
Usage
import React from 'react'
import { useLoremIpsum } from 'use-lorem-ipsum'
export default () => {
const message = useLoremIpsum("words", 2);
return (
<div>
Hello {message}
</div>
);
}