Check out example codes for "read a line rust". It will help you in understanding the concepts better.

Code Example 1

let mut input_string = String::new();
    io::stdin().read_line(&mut input_string)
    	.ok()
	    .expect("Failed to read line");

Learn ReactJs, React Native from akashmittal.com