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

Code Example 1

Input.mousePosition

Code Example 2

Vector2 mousePosition = new Vector2(Input.mousePosition.x, Input.mousePosition.y);

Learn ReactJs, React Native from akashmittal.com