How can I print only one component on click of a button.
I know this solution:
window.frames[\"print_frame\"].window.focus();
window.frames[\"print
I was looking for a simple package that would do this very same task and did not find anything so I created https://github.com/gregnb/react-to-print
You can use it like so:
Print this out!}
content={() => this.componentRef}
/>
(this.componentRef = el)} />