How do I connect my React app to a backend?

0
8
Asked By CuriousCoder99 On

I've just finished building a nice React app with form validation and it turned out to be pretty straightforward. However, when I click submit, nothing happens. I know I need to link my React app to a backend that includes a database, but I'm completely unsure about where to start. I've considered using a Go backend with a PostgreSQL database but don't know how to piece it all together. I have some basic knowledge of backends but could really use some guidance. Are there any helpful documents or guides available? I'm not a fan of video tutorials or courses since I taught myself React without them. Thanks!

2 Answers

Answered By TechieTraveler On

If you're new to Go and PostgreSQL, I'd suggest learning those basics first. Once you get the hang of Go, try creating a simple command-line CRUD app to solidify your understanding. Then, dive into REST APIs so you can see how your backend connects with your frontend. Good luck with your learning, it can be a fun journey!

Answered By CodeExplorer42 On

Remember that the backend and the database are separate components. It's best to tackle them one at a time. Since you're already familiar with JavaScript from React, you might want to consider a JavaScript web framework like Express.js. It simplifies the HTTP process a lot. Just check out the starter guide on their website and you’ll be off to a good start!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.