react-detect-print
react-detect-print copied to clipboard
addListener is depricated
addListener is depricated for matchMedia. Is there another solution?
It looks like window.addEventListener("beforeprint") works so I changed the library to this method. At the same time I changed it to a hook so please be aware of the change in the way it is to be used.
It's only lightly tested so I would appreciate it if you give it a shot and let me know if it works (it worked well in Chrome, Firefox, and Safari on Mac).
No issue reports since update so closing. Please log a new issue if there is any compatibility or deprecation of the current method.