skip to Main Content

I am trying to view my react-app website on my phone . I already set my network to private network and used the ipv4 address in my browser but it’s taking time and it isn’t loading . I don’t know what I am doing wrong

I expected it to be viewable on my mobile phone

2

Answers


  1. Use ngrok simply to run it across multiple devices

    Login or Signup to reply.
  2. If you are using vite, just replace this in the scripts in package.json file:

    "dev": "vite"

    with

    "dev": "vite –host"

    Then run npm run dev you would be able to see the network link for your app to run on another device on same network

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search