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

Code Example 1

// See this website: https://pughtml.com/

Code Example 2

// use https://pughtml.com/ for this

Learn ReactJs, React Native from akashmittal.com