Check out example codes for "unity transform..rotation not correct". It will help you in understanding the concepts better.

Code Example 1

playerModel.transform.localRotation.eulerAngles.x

Learn ReactJs, React Native from akashmittal.com