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

Code Example 1

//The Variable
Rigibody rb;

void Start()
{
	rb = GetComponent<Rigidbody>();
}

Code Example 2

public Rigidbody rigidbody;

Learn ReactJs, React Native from akashmittal.com