Check out example codes for "object spin unity". It will help you in understanding the concepts better.
Code Example 1
void FixedUpdate()
{
gameObject.transform.Rotate(0, 0, +1)//Rotate(x, y, z) + = add one per update
}
Learn ReactJs, React Native from akashmittal.com