From the course: React Native Essential Training

Unlock the full course today

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

Using TextInput to implement search

Using TextInput to implement search - React Native Tutorial

From the course: React Native Essential Training

Start my 1-month free trial

Using TextInput to implement search

- [Instructor] So let's now think about the search feature. We'll start with the market. Let's add a search text input in here above all the deals. So that would be in the app component in here. So if I am rendering a deal list, I'd like the system to be able to give me a search feature on that. I don't need the search feature if I'm on a deal detaile view, I just need it when I'm on a deal list view. So I'm going to put this inside view, and I'll add a text input. Now we can add the text input right here directly and start working with that. But this search bar is going to be a controlled component. And in fact, we should debounce the search so that the search fires immediately when we type, but not on every character, and this way we don't have to have a submit search button. So to isolate all this features, we'll put them in their own components. I'm going to call this component search bar and go implement it.…

Contents