use-detect-print
use-detect-print copied to clipboard
Doesn't work correctly with window.print()
When triggering with window.print() instead of printing using hotkeys or File > Print, this doesn't update the status state in time
I created a package which solves this. But the side effect the change is visible on screen while print is happening through window.print() : https://github.com/geongeorge/react-use-print
Live demo: https://codesandbox.io/p/sandbox/determined-benz-4mnj6h