Check out example codes for "print page html". It will help you in understanding the concepts better.

Code Example 1

window.print();

Code Example 2

<button onClick="window.print()">Print</button>

Learn ReactJs, React Native from akashmittal.com