Check out example codes for "how to remove a component from an object in unity". It will help you in understanding the concepts better.

Code Example 1

Destroy(GetComponent<TheComponentYouWantToDestroy>());

Code Example 2

Destroy (gameObject);

Learn ReactJs, React Native from akashmittal.com