In this blog we will discuss Multiple Image Uploads in React JS with NodeJs And MongoDB. For the frontend we will have an Input tag with multiple attribute to take multiple inputs in React JS example - < input onChange = { ( e ) => { setImage ( e . target . files ) } } multiple type = "file" /> We will the bind the onChange method with the state to save the e.target.files (FileList Array) const [ image , setImage ] = useState ([]) We will create a button to handle API submit < button onClick = { handleSubmit } > SUBMIT </ button > So the code on App.js Becomes : import { useState } from "react" import axios from 'axios' function App () { const [ image , setImage ] = useState ([]) const [ category , setCategory ] = useState ( 'electronics' ) c...
Hi Guys Welcome to Saifi Code , Here I have blogs on react js tutorial for beginners step by step with examples in hindi. Also I make Blogs/videos on react js form examples for beginners and react js functional component hooks. You will find How to create form in react js functional component.