From the course: Create a CRM Mobile Application with React Native
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Create a new add person form - React Native Tutorial
From the course: Create a CRM Mobile Application with React Native
Create a new add person form
- [Instructor] In this chapter, we'll focus on adding all the proper CRUD operations with our actions, reducers, and then finalize them with the components, so let's get started, so what we're going to do first is go inside of our index here, and we're going to start adding a few actions, so what I'm going to do, right after the noneSelected and before the loadInitialContacts. It doesn't really matter where in the file you put this, but for me, it's create and then load, and this is what I'm going to do, so first, we're going to create an action that's going to be called createNewContact, and these are going to take a few things, so let's go ahead and add the elements that we're going to need. The first one is, obviously, we're going to need a firstName passed to create a new contact, lastName, and let me just close the Explorer so we have more screen estate. Then we're going to pass the phone, the email, company, project, and then notes, and then, inside of this particular function…
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.