user17821660
user17821660

Reputation:

Why can't I see my react-app through local network?

I want to see my react app in my local network, but I can't. When I run npm start to start the local host and see my react app, it gives me two URLs. One for my current device and the other for the local network. When I open the local network URL on my phone, I just see that the page is loading. It doesn't give me any errors. I've ensured that my IP address is correct. Previously I was able to see the apps through local network, so not sure if I'm missing something trivial.

Upvotes: 0

Views: 2555

Answers (2)

Hamid Hussain
Hamid Hussain

Reputation: 51

Follow these steps:

  1. Setting -> Network & internet -> Wi-Fi -> xyz propeties (here xyz is connected wifi name) -> Network Profile Type -> check as private

  2. Firewall & network protection (search it and open it) -> Private Network -> Microsoft Defender Firewall turn off

Hope it will work...

Upvotes: 3

Muhammad Usman
Muhammad Usman

Reputation: 1

The best way to test your ReactJS app on your phone is to Follow the following steps

  1. Run your using npm start
  2. After Go to the CMD in your windows machine and type the command ipconfig then enter that IP address with:3000 port in your Smartphone browser For Example, if your IP is 192.168.1.101:3000. the IP address should use a 3000 port Note:- Make sure your PC and Smartphone are Connected on the same Wifi network

Upvotes: 0

Related Questions