I am getting a HTML div from an API response and I want to send that response to the browser print command at a click of a button. Usually, window.print() works if you want to print the current page. But my current page has a different UI and the page I want to print is different. Any suggestion on how we can do this in React js?
Changing the current page and calling window.print() doesn't look like a feasible solution. The UI doesn't look that way. Any other solution appreciated. Thank you.