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

Code Example 1

ssh -R 80:localhost:8080 ssh.localhost.run

Learn ReactJs, React Native from akashmittal.com