use-detect-print
React Hook to detect printing
Installation
npm install use-detect-print --save
Usage
;; { const isPrinting = ; return <div> <span>Is it printing? </span> isPrinting ? <span style= color: 'green' fontSize: 50 >Yes</span> : <span style= color: 'red' >No!</span> </div> );}