keydown event not getting caught in react unless I cause a re-render – Javascript
I'm trying to print specific components of my app using react-to-print library. I'm trying to override the event of pressing ctrl+p for printing by using event.preventDefault() and it's working for the first time that is when the app renders, on…