Check out example codes for "disable right click with css". It will help you in understanding the concepts better.

Code Example 1

document.oncontextmenu = new Function("return false;");

Learn ReactJs, React Native from akashmittal.com