JSFiddle - React, Tailwind, and code Playground

HTML

<button id="myButton" class="hidden-print">Print Products</button>

JavaScript

document.getElementById('myButton').onclick = printProducts;

function printProducts(){
	window.print();
}