react-detect-print icon indicating copy to clipboard operation
react-detect-print copied to clipboard

addListener is depricated

Open seleckis opened this issue 4 years ago • 1 comments

addListener is depricated for matchMedia. Is there another solution?

seleckis avatar Jun 04 '21 08:06 seleckis

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).

tacomanator avatar Jun 24 '21 05:06 tacomanator

No issue reports since update so closing. Please log a new issue if there is any compatibility or deprecation of the current method.

tacomanator avatar Dec 21 '22 03:12 tacomanator