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

Code Example 1

//to add a new ridgidbody
//to add a new meshCollider
//Original answer by MakerBenjammin6, cleanup by me.

Code Example 2

void Reset()
  //Your code here

Code Example 3

//This uses C# and unity
//to add a ridgidbody
//to add a meshCollider
//check out my profile

Code Example 4

//Use the AddComponent<T>() Method to add a component to your gameobject
GameObject gameObject;

gameObject.AddComponent<BoxCollider>(); //Component has to be an actual Unity component

Learn ReactJs, React Native from