user3296193
user3296193

Reputation: 49

how do you use node with mysql for react.js front end?

so I have a project that I want to use react.js for my front end and use node with mysql for my back end. Is there any guides or examples that would help me with this? I know how to use node with mysql but having trouble connecting it to react.js front end. Coming from an angularjs background, what is the equal to using https? Are there any examples that I can look at for guidance?

Upvotes: 0

Views: 1032

Answers (1)

Andy-Delosdos
Andy-Delosdos

Reputation: 3720

React doesn't have its own version of the HTTP service.

You can use something like Fetch: https://www.npmjs.com/package/whatwg-fetch which is a polyfill for the not yet fully supported Fetch API.

You can read more about Fetch API here: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API

Another alternative is Axios: https://www.npmjs.com/package/axios

Upvotes: 1

Related Questions