I am creating a react-native app and one of the components I have created contains a property which is populated through data coming from an http request.
Right now
One another easy way. First you need to on Mobile HotSpot and connect to laptop using Mobile HotSpot. Then check you ip assign to your computer and replace api url http://localhost:80/ address to http://192.168.5.43:80/ in react-native source where you use.
Replace port 80 to your api server port no.
Make sure you have open server port (80) in firewall in laptop.
Test api in android rest-client https://play.google.com/store/apps/details?id=com.sn.restandroid app (url : http://192.168.5.43:80/api)