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

Code Example 1

Difido is Java based reporting system for Test Automation supporting TestNG, NUnit and JSystem frameworks.
https://github.com/Top-Q/difido-reports/wiki

Learn ReactJs, React Native from akashmittal.com