Check out example codes for "figma to html". It will help you in understanding the concepts better.
Code Example 1
Figma to html is a figma plugin that helps convert your figma design to code easily without loosing any bit of your design or colors. Check out: https://figma-html.netlify.app/#/
Learn ReactJs, React Native from akashmittal.com