Check out example codes for "how to go to wifi i3". It will help you in understanding the concepts better.

Code Example 1

$: nm-connection-editor

Learn ReactJs, React Native from akashmittal.com