DEV Community

Cover image for How to Deploy React Apps to Netlify(Part 1)
Kritika Srivastava
Kritika Srivastava

Posted on • Updated on

How to Deploy React Apps to Netlify(Part 1)

Hello Developer Friends.2021 is here and I hope you are learning React and would have created few apps and uploaded it on Github.Now hopefully you might be looking for hosting it on some platform so that your friends,family and whole world can see the live App which you have built.Hence,I am sharing one of the ways to deploy your React App on Netlify which is free.

Prerequisites:

1.Create your account on Netlify:
Netlify link-https://www.netlify.com/
You can sign up using your Github account.
Once you have created your account successfully and connected to one of the Git Providers(here Github) now let us proceed further.
2.Make sure you have pushed your complete code on github and it should not contain any errors.As per my personal experience if my code contain any errors then deployment fails on Netlify.

Steps for Deployment:

1.Connect to Github.

Alt Text
2.Click on "Configure the Netlify app on Github" and choose the repository which you want to deploy.I have taken the example of one of my repositories on Github.

Alt Text
3.Now click on the right arrow next to your repository name and click on "Deploy site".

Alt Text
4.After few seconds your site will be generated which you can open to test your app and share it with others.

Alt Text

Further to explore & Google:

1.In case you have used React router Netlify creates problem sometimes.You can google it further how to avoid it.
2.You can also set up a custom domain for your site on Netlify.
3.In case of deploying MERN App you can use Heroku and Netlify together.
4.You can also use Github pages for deploying your React Apps.

Happy Deployment Friends.Do share your App links with me :)

You can follow me on Twitter and Github. You can also subscribe to my
React Newsletter

Top comments (0)