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
From the course: Building Production-Ready React Apps: Setup to Deployment with Firebase
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
Introduction to Hooks API Reference2m 52s
-
(Locked)
Learn event handling and updating the state4m 12s
-
(Locked)
Handle conditional rendering3m 47s
-
(Locked)
Work with forms4m 1s
-
(Locked)
Submit the form and apply side effects: useEffect5m 32s
-
(Locked)
Validate and submit forms: useMemo6m 11s
-
(Locked)
Handle complex logic with useReducer5m 34s
-
(Locked)
Create and dispatch actions4m 37s
-
(Locked)
Compose and update the UI6m 1s
-
-
-
-
-
-
-
-
-
-