Check out example codes for "js making input non typeable". It will help you in understanding the concepts better.

Code Example 1

//Use readonly

<input id="myInput" readonly>

Learn ReactJs, React Native from akashmittal.com