Create the section in the view for editing and deleting contacts and then add the proper code to delete a contact. First, add new elements. Then, style it a bit. Next, add the action and reducer to delete your contact on Firebase and then update the state.
- [Instructor] Now that we have the ability…to add contacts to our list,…we need to be able to delete them.…So let's do just that.…So, the first thing you want to do is…go into your index.js file…and scroll all the way down to…where you have your two actions,…createNewContact, loadInitialContacts,…and we'll copy and paste one of them.…Cause most of the code that we need to type…is pretty much similar to what we've done in the past.…So, this one we'll call deleteContact.…And inside of that one, as you may have guessed,…we need to pass the uid of the contact we want to delete.…
We still need to make sure we have a user.…And inside of our return,…we'll change a few things.…So, let's remove this one here.…For the Firebase statement here…we're going to change a few things.…So, first of all,…you want to make sure that…at the end of your template strings,…you pass the uid that you want to delete,…like so.…uid, perfect.…And then we simply are removing it.…
So, that's how simple it is to remove a uid in Firebase.…The only thing we need to code now is to…
- Initializing React Native projects
- Projecting a folder structure
- Installing material kit and vector icons
- Coding a login form and a loader
- Setting up Firebase email auth
- Using the React Native debugger
- Creating a list view, a detailed view, and a menu
- Setting up Redux
- Coding the scroll on detail view
- Adding clickable buttons
- Setting up Firebase for the back end
- Creating the new add person form
- Completing functions
Skill Level Intermediate
1. Project Setup and Back End
2. Creating the Login
3. Redux and Main Views
4. CRUD Operations
5. Company View and Final Touches
Next steps1m 11s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.