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

Code Example 1

Use <div> as a button and trigger a mailto when it is clicked

Learn ReactJs, React Native from akashmittal.com