Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gregnb/use-detect-print

A react hook to detect when a page is being printed
https://github.com/gregnb/use-detect-print

hooks react react-hooks

Last synced: about 2 months ago
JSON representation

A react hook to detect when a page is being printed

Awesome Lists containing this project

README

        

# use-detect-print

React Hook to detect printing

## Installation

```
npm install use-detect-print --save
```

## Usage

```javascript
import React from 'react';
import useDetectPrint from 'use-detect-print';

function App() {

const isPrinting = useDetectPrint();

return (


Is it printing?
{isPrinting ? (
Yes
): (
No!
)}

);
}

```