JSFiddle - React, Tailwind, and code Playground
HTML
<button class = "hidden-print" onclick = "printProducts()">Print Products</button>
JavaScript
function printProducts(){
window.print();
}
<button class = "hidden-print" onclick = "printProducts()">Print Products</button>
function printProducts(){
window.print();
}