From the course: React: Cloud-Powered Apps with Firebase

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Updating user documents, part 1

Updating user documents, part 1

From the course: React: Cloud-Powered Apps with Firebase

Start my 1-month free trial

Updating user documents, part 1

- [Tutor] We now need to provide a way for a user to edit the profile data. To do so, we will need new form in our profile(mumbles) in the Exercise files folder, look at resources and then open the folder for this video 03-06. We can go ahead and open this file as it contains some JSX, let's copy that, let's go ahead and paste it here. Let's give that a save and head over to our browser, and we see that the form is displayed now, heading back to the profile component, we need to make one small change in regards to where we grab the current user ID. Instead of grabbing the user ID from the current authenticated user, we will use the ID from the route, this will become useful later when we have an admin user that is requesting data for a particular user. We can go ahead and import useParams from react-router-dom. We can then grab and hold the Params here. And finally, we can update this to Params.id. The next thing…

Contents