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

Code Example 1

using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;public class ExampleClass : MonoBehaviour
{
    void OnMouseDown()
    {
        // Destroy the gameObject after clicking on it
        Destroy(gameObject);
    }
}

Learn ReactJs, React Native from akashmittal.com