From the course: Building Production-Ready React Apps: Setup to Deployment with Firebase

Unlock the full course today

Join today to access over 24,500 courses taught by industry experts.

Submit the form and apply side effects: useEffect

Submit the form and apply side effects: useEffect

- [Instructor] So far, we've been using placeholder images to do the demonstration. So now, we want to upload actual images. And as part of this class, we are providing as well a collection of images that you can use for free for the next demonstrations. So let's go back to the source code. And we want to update the way that we manage the form to get the data. So first, we want to update with the title, then the file that we upload, and also create a path so we can display our preview. So we're going to change here so the way that we handle the inputs with an S. So make sure that you change to inputs. And then here, I'm going to update first with the information of the title, then the file, and that's going to be handled differently because we want to access the data of the files. And we make sure to get the first element because this is an array. Next, we create a path so we can display a preview. So that's going to be…

Contents