DEV Community

Discussion on: I need help To build a React App

Collapse
 
myogeshchavan97 profile image
Yogesh Chavan • Edited

You can use Node.js which will connect to the database either MongoDB or SQL database and store the t-shirt details in the database and expose that as a Rest APIs and Use React at the front-end for accessing the API to add/update/delete the data.

This course is the best for learning React and this course is best for learning Node.js.

You can check out my this article to understand how you can store the image in database which uses MongoDB. Here is the source code for it.

You will need to add the extra fields in the schema in addition to the photo in this file like this

const ShirtSchema = mongoose.Schema({
  description: {
   type: String
  },
  image: {
    type: Buffer
  }
});

and append those details by taking the details from user in React App to the formData in this file