Check out example codes for "unity docs player input". It will help you in understanding the concepts better.

Code Example 1

using UnityEngine;
using System.Collections;public class ExampleClass : MonoBehaviour
{
    public void Update()
    {
        if (Input.GetButtonDown("Fire1"))
        {
            Debug.Log(Input.mousePosition);
        }
    }
}

Learn ReactJs, React Native from akashmittal.com