DEV Community

Cover image for View your local React App on your phone.
Vivek Thakur
Vivek Thakur

Posted on

View your local React App on your phone.

Have you ever faced a problem while making your site responsive for small mobile device? Yeah chrome web tools were great but sometimes they are not enough. Sometimes we want how it actually looks like on my device.

So here is you do it!

Step 1 :

Make sure your laptop/PC and phone connected to a same network. If you are using your phone's hotspot then it gonna work fine.

Step 2 :

In your terminal run your development server with some aditional arguements.

npm run dev --  --host
Enter fullscreen mode Exit fullscreen mode

img1

Step 3:

Then you should got something like this in your terminal :

img2

Copy the 2nd Network of the terminal and paste it in your phone's browser.

And done! Enjoy the show!!!!!!!!

If the 2nd address doesn't workout try with 1st one.

Thanks for reading

My Github

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay