{"id":813,"date":"2021-12-14T06:04:39","date_gmt":"2021-12-14T05:04:39","guid":{"rendered":"https:\/\/codeflarelimited.com\/blog\/?p=813"},"modified":"2021-12-14T06:04:42","modified_gmt":"2021-12-14T05:04:42","slug":"real-time-data-search-from-api-using-search-bar-filter-and-listview-in-react-native","status":"publish","type":"post","link":"https:\/\/codeflarelimited.com\/blog\/real-time-data-search-from-api-using-search-bar-filter-and-listview-in-react-native\/","title":{"rendered":"Real-time Data Search From API Using Search Bar Filter and ListView in React Native"},"content":{"rendered":"\n<p>Real-time data search functionality can be very crucial for your React Native app, especially as it begins to scale.<\/p>\n\n\n\n<p>Let&#8217;s picture this:<\/p>\n\n\n\n<p>You have a product listing application with hundreds of available products. It will be incredibly difficult and discouraging  for users of your app to begin to sift through the products one-by-one. What if they just want to buy a particular product on the spot?<\/p>\n\n\n\n<p>Implementing the search functionality will make it easier for users to have a good experience with your app and save them quality time that would otherwise be needlessly spent going through a boring cinema of your products. No offence ):<\/p>\n\n\n\n<p>So, let&#8217;s begin.<\/p>\n\n\n\n<p>In this tutorial, I&#8217;m going to assume that you already have some working knowledge of React Native, which means I&#8217;m not going to go through the fundamentals of creating a new React Native application. We have already covered that <a href=\"https:\/\/codeflarelimited.com\/blog\/beginning-with-react-native\/\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>.<\/p>\n\n\n\n<p>We shall also, as a matter of necessity, use components from <a href=\"https:\/\/reactnativeelements.com\" target=\"_blank\" rel=\"noreferrer noopener\">React Native Elements<\/a>, a library that makes creating UI components seamless. This library also depends on another package called <em><a href=\"https:\/\/www.npmjs.com\/package\/react-native-vector-icons\" target=\"_blank\" rel=\"noreferrer noopener\">react-native-vector-icons<\/a><\/em>.<\/p>\n\n\n\n<p>Also, we shall be working with GET Request API (Application Programming Interface) that list out names by nationality<\/p>\n\n\n\n<p>We are going to add both dependencies to our React Native application as follows:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">npm install react-native-vector-icons\n\n\/\/or\n\nyarn add react-native-vector-icons\n\n\nnpm install react-native-elements\n\n\/\/or\n\nyarn add react-native-elements<\/code><\/pre>\n\n\n\n<p>Next, let&#8217;s create a new component called Home.js (You can give it any name of your choice)<\/p>\n\n\n\n<pre title=\"Home.js\" class=\"wp-block-code\"><code lang=\"jsx\" class=\"language-jsx\">import React, {Component} from 'react';\n\nclass Home extends Component {\n\n}\n\nexport default Home;<\/code><\/pre>\n\n\n\n<p>Next, We&#8217;ll add some state variables to our code<\/p>\n\n\n\n<pre title=\"Home.js\" class=\"wp-block-code\"><code lang=\"jsx\" class=\"language-jsx\">class Home extends Component {\n\nconstructor(props) {\n    super(props);\n    this.state = {\n      search: '',\n      data: [],\n      error: null,\n      loading: false,\n    };\n  }\n\n}\n\nexport default Home;<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>Moving on, we are going to write a function that makes the search<\/p>\n\n\n\n<pre title=\"Home.js\" class=\"wp-block-code\"><code lang=\"jsx\" class=\"language-jsx\">search = async () => {\n    const url = `https:\/\/api.nationalize.io\/?name=` + this.state.search;\n    this.setState({loading: true});\n    fetch(url, {\n      method: 'GET',\n    })\n      .then(res => res.json())\n      .then(res => {\n        this.setState({\n          data: res.country,\n          error: res.error || null,\n          loading: false,\n        });\n      })\n      .catch(error => {\n        this.setState({error, loading: false});\n      });\n  };<\/code><\/pre>\n\n\n\n<p>To make it easier for us to display our data retrieved from our GET Request, we shall be making use of Flatlist. Aha!<\/p>\n\n\n\n<p>So, let&#8217;s render our data as follows. Also, don&#8217;t forget to import <em>Flatlist <\/em>from <em>react-native<\/em><\/p>\n\n\n\n<pre title=\"Home.js\" class=\"wp-block-code\"><code lang=\"jsx\" class=\"language-jsx\">\/\/required imports\nimport React, {Component} from 'react';\nimport {\n  View,\n  FlatList,\n  TouchableOpacity,\n  ActivityIndicator,\n  StatusBar,\n} from 'react-native';\nimport {SearchBar, Button, ListItem} from 'react-native-elements';\n\n\nrenderSearch = () => {\n    return this.state.data.map(item => {\n      return (\n        &lt;View>\n          &lt;Text>{item.name}&lt;\/Text>\n        &lt;\/View>\n      );\n    });\n  };\n\n  renderItem = ({item}) => (\n    &lt;TouchableOpacity\n      onPress={() =>\n        requestAnimationFrame(() =>\n          this.props.navigation.navigate('Description', {\n            title: item.title,\n            imageName: item.image_url,\n            synopsis: item.synopsis,\n            episodes: item.episodes,\n            rated: item.rated,\n          }),\n        )\n      }>\n      &lt;ListItem bottomDivider>\n        &lt;ListItem.Content>\n          &lt;ListItem.Title>{item.title}&lt;\/ListItem.Title>\n          &lt;ListItem.Subtitle\n            style={{color: '#000', textTransform: 'uppercase'}}>\n            country: {item.country_id}\n          &lt;\/ListItem.Subtitle>\n          &lt;ListItem.Subtitle\n            style={{color: '#9D7463', textTransform: 'capitalize'}}>\n            probability: {item.probability}\n          &lt;\/ListItem.Subtitle>\n        &lt;\/ListItem.Content>\n      &lt;\/ListItem>\n    &lt;\/TouchableOpacity>\n  );<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>Finally, We will render our component as follows:<\/p>\n\n\n\n<pre title=\"Home.js\" class=\"wp-block-code\"><code lang=\"jsx\" class=\"language-jsx\"> render() {\n    return (\n      &lt;View style={styles.searchContainer}>\n        &lt;StatusBar barStyle=\"light-content\" backgroundColor={primaryColor} \/>\n        &lt;View style={styles.search}>\n          &lt;SearchBar\n            containerStyle={{width: '70%', height: 80, backgroundColor: '#fff'}}\n            placeholder=\"Search name\"\n            lightTheme\n            platform=\"ios\"\n            autoFocus={true}\n            showLoading={false}\n            autoCorrect={false}\n            value={this.state.search}\n            onChangeText={search => this.setState({search})}\n          \/>\n          &lt;Button\n            buttonStyle={{backgroundColor: primaryColor, padding: 9}}\n            title=\"search\"\n            onPress={() => this.search()}\n          \/>\n        &lt;\/View>\n\n        {this.state.loading ? (\n          &lt;ActivityIndicator\n            style={{\n              position: 'absolute',\n              flexDirection: 'row',\n              top: 0,\n              left: 0,\n              right: 0,\n              bottom: 0,\n              marginTop: 0,\n            }}\n            size=\"large\"\n            color=\"#0275d8\"\n          \/>\n        ) : (\n          &lt;FlatList\n            style={{flex: 1}}\n            data={this.state.data}\n            renderItem={this.renderItem}\n            keyExtractor={item => item.country_id.toString()}\n            ItemSeparatorComponent={this.renderSeparator}\n            ListHeaderComponent={this.renderHeader}\n          \/>\n        )}\n      &lt;\/View>\n    );\n  }<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-here-is-our-full-working-code\">Here is our full working code:<\/h3>\n\n\n\n<pre title=\"Home.js\" class=\"wp-block-code\"><code lang=\"jsx\" class=\"language-jsx\">import React, {Component} from 'react';\nimport {\n  View,\n  FlatList,\n  TouchableOpacity,\n  ActivityIndicator,\n  StatusBar,\n} from 'react-native';\nimport {SearchBar, Button, ListItem} from 'react-native-elements';\nimport {styles, primaryColor} from '..\/assets\/styles\/Style';\n\nclass Home extends Component {\n  constructor(props) {\n    super(props);\n    this.state = {\n      search: '',\n      data: [],\n      error: null,\n      loading: false,\n    };\n  }\n\n  search = async () => {\n    const url = `https:\/\/api.nationalize.io\/?name=` + this.state.search;\n    this.setState({loading: true});\n    fetch(url, {\n      method: 'GET',\n    })\n      .then(res => res.json())\n      .then(res => {\n        this.setState({\n          data: res.country,\n          error: res.error || null,\n          loading: false,\n        });\n      })\n      .catch(error => {\n        this.setState({error, loading: false});\n      });\n  };\n\n  renderSearch = () => {\n    return this.state.data.map(item => {\n      return (\n        &lt;View>\n          &lt;Text>{item.name}&lt;\/Text>\n        &lt;\/View>\n      );\n    });\n  };\n\n  renderItem = ({item}) => (\n    &lt;TouchableOpacity\n      onPress={() =>\n        requestAnimationFrame(() =>\n          this.props.navigation.navigate('Description', {\n            title: item.title,\n            imageName: item.image_url,\n            synopsis: item.synopsis,\n            episodes: item.episodes,\n            rated: item.rated,\n          }),\n        )\n      }>\n      &lt;ListItem bottomDivider>\n        &lt;ListItem.Content>\n          &lt;ListItem.Title>{item.title}&lt;\/ListItem.Title>\n          &lt;ListItem.Subtitle\n            style={{color: '#000', textTransform: 'uppercase'}}>\n            country: {item.country_id}\n          &lt;\/ListItem.Subtitle>\n          &lt;ListItem.Subtitle\n            style={{color: '#9D7463', textTransform: 'capitalize'}}>\n            probability: {item.probability}\n          &lt;\/ListItem.Subtitle>\n        &lt;\/ListItem.Content>\n      &lt;\/ListItem>\n    &lt;\/TouchableOpacity>\n  );\n\n  render() {\n    return (\n      &lt;View style={styles.searchContainer}>\n        &lt;StatusBar barStyle=\"light-content\" backgroundColor={primaryColor} \/>\n        &lt;View style={styles.search}>\n          &lt;SearchBar\n            containerStyle={{width: '70%', height: 80, backgroundColor: '#fff'}}\n            placeholder=\"Search name\"\n            lightTheme\n            platform=\"ios\"\n            autoFocus={true}\n            showLoading={false}\n            autoCorrect={false}\n            value={this.state.search}\n            onChangeText={search => this.setState({search})}\n          \/>\n          &lt;Button\n            buttonStyle={{backgroundColor: primaryColor, padding: 9}}\n            title=\"search\"\n            onPress={() => this.search()}\n          \/>\n        &lt;\/View>\n\n        {this.state.loading ? (\n          &lt;ActivityIndicator\n            style={{\n              position: 'absolute',\n              flexDirection: 'row',\n              top: 0,\n              left: 0,\n              right: 0,\n              bottom: 0,\n              marginTop: 0,\n            }}\n            size=\"large\"\n            color=\"#0275d8\"\n          \/>\n        ) : (\n          &lt;FlatList\n            style={{flex: 1}}\n            data={this.state.data}\n            renderItem={this.renderItem}\n            keyExtractor={item => item.country_id.toString()}\n            ItemSeparatorComponent={this.renderSeparator}\n            ListHeaderComponent={this.renderHeader}\n          \/>\n        )}\n      &lt;\/View>\n    );\n  }\n}\n\nexport default Home;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-don-t-run-the-app-yet-let-s-add-our-style-sheet-shall-we\">Don&#8217;t run the app yet! Let&#8217;s add our style sheet, shall we?<\/h3>\n\n\n\n<p>Create a folder called assets. Inside the assets folder, create another folder called styles. Now inside the styles folder, create a file called Style.js and add the following code.<\/p>\n\n\n\n<p>Don&#8217;t know how to use an external style sheet in React Native? Check it out here<\/p>\n\n\n\n<pre title=\"Style.js\" class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">import {StyleSheet} from 'react-native';\n\nconst primaryColor = '#6F3A00';\nconst secondaryColor = '#00689E';\nconst white = '#FFF';\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n  },\n  search: {\n    flexDirection: 'row',\n    justifyContent: 'space-evenly',\n    alignItems: 'center',\n  },\n  searchContainer: {\n    flex: 1,\n    backgroundColor: '#fff',\n  },\n});\n\nexport {styles, primaryColor, secondaryColor, white};<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-you-re-good-to-go-with-react-native-real-time-search\">You&#8217;re good to go with react native real time search!<\/h3>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2021\/12\/quicksquarenew_202192416356251.jpg\" alt=\"\" class=\"wp-image-815\" width=\"422\" height=\"422\" srcset=\"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2021\/12\/quicksquarenew_202192416356251.jpg 720w, https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2021\/12\/quicksquarenew_202192416356251-300x300.jpg 300w, https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2021\/12\/quicksquarenew_202192416356251-150x150.jpg 150w\" sizes=\"auto, (max-width: 422px) 100vw, 422px\" \/><figcaption>React Native API Search Functionality<\/figcaption><\/figure>\n\n\n\n<p>That&#8217;s how we implement a react native real time search.<\/p>\n\n\n\n<p>Enjoy this tutorial? Let me know how it&#8217;s going in the comments.<\/p>\n\n\n\n<p>Also support us by sharing, liking and following us on our social media platforms.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Real-time data search functionality can be very crucial for your React Native app, especially as it begins to<\/p>\n","protected":false},"author":1,"featured_media":816,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[98],"tags":[],"class_list":["post-813","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-softare-development"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Real-time Data Search From API Using Search Bar Filter and ListView in React Native<\/title>\n<meta name=\"description\" content=\"Real-time data search functionality can be very crucial for your React Native app, especially as it begins to scale\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/codeflarelimited.com\/blog\/real-time-data-search-from-api-using-search-bar-filter-and-listview-in-react-native\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Real-time Data Search From API Using Search Bar Filter and ListView in React Native\" \/>\n<meta property=\"og:description\" content=\"Real-time data search functionality can be very crucial for your React Native app, especially as it begins to scale\" \/>\n<meta property=\"og:url\" content=\"https:\/\/codeflarelimited.com\/blog\/real-time-data-search-from-api-using-search-bar-filter-and-listview-in-react-native\/\" \/>\n<meta property=\"article:author\" content=\"https:\/\/facebook.com\/codeflretech\" \/>\n<meta property=\"article:published_time\" content=\"2021-12-14T05:04:39+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-12-14T05:04:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2021\/12\/Untitled-Design.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"1500\" \/>\n\t<meta property=\"og:image:height\" content=\"750\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"codeflare\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@codeflaretech\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"TechArticle\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/real-time-data-search-from-api-using-search-bar-filter-and-listview-in-react-native\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/real-time-data-search-from-api-using-search-bar-filter-and-listview-in-react-native\\\/\"},\"author\":{\"name\":\"codeflare\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/person\\\/7e65653d49add95629f8c1053c5cd76a\"},\"headline\":\"Real-time Data Search From API Using Search Bar Filter and ListView in React Native\",\"datePublished\":\"2021-12-14T05:04:39+00:00\",\"dateModified\":\"2021-12-14T05:04:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/real-time-data-search-from-api-using-search-bar-filter-and-listview-in-react-native\\\/\"},\"wordCount\":426,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/real-time-data-search-from-api-using-search-bar-filter-and-listview-in-react-native\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/Untitled-Design.jpeg\",\"articleSection\":[\"softare development\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/real-time-data-search-from-api-using-search-bar-filter-and-listview-in-react-native\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/real-time-data-search-from-api-using-search-bar-filter-and-listview-in-react-native\\\/\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/real-time-data-search-from-api-using-search-bar-filter-and-listview-in-react-native\\\/\",\"name\":\"Real-time Data Search From API Using Search Bar Filter and ListView in React Native\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/real-time-data-search-from-api-using-search-bar-filter-and-listview-in-react-native\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/real-time-data-search-from-api-using-search-bar-filter-and-listview-in-react-native\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/Untitled-Design.jpeg\",\"datePublished\":\"2021-12-14T05:04:39+00:00\",\"dateModified\":\"2021-12-14T05:04:42+00:00\",\"description\":\"Real-time data search functionality can be very crucial for your React Native app, especially as it begins to scale\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/real-time-data-search-from-api-using-search-bar-filter-and-listview-in-react-native\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/real-time-data-search-from-api-using-search-bar-filter-and-listview-in-react-native\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/real-time-data-search-from-api-using-search-bar-filter-and-listview-in-react-native\\\/#primaryimage\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/Untitled-Design.jpeg\",\"contentUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/Untitled-Design.jpeg\",\"width\":1500,\"height\":750,\"caption\":\"React Native API Search\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/real-time-data-search-from-api-using-search-bar-filter-and-listview-in-react-native\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"softare development\",\"item\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/softare-development\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Real-time Data Search From API Using Search Bar Filter and ListView in React Native\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/\",\"name\":\"\",\"description\":\"Sustainable solutions\",\"publisher\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#organization\",\"name\":\"Codeflare Limited\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/codeflare.png\",\"contentUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/codeflare.png\",\"width\":1040,\"height\":263,\"caption\":\"Codeflare Limited\"},\"image\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/person\\\/7e65653d49add95629f8c1053c5cd76a\",\"name\":\"codeflare\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/59cef917c86d965eea581d2747f51bd6382003a68bfce7c8a4dfec98b4cd838d?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/59cef917c86d965eea581d2747f51bd6382003a68bfce7c8a4dfec98b4cd838d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/59cef917c86d965eea581d2747f51bd6382003a68bfce7c8a4dfec98b4cd838d?s=96&d=mm&r=g\",\"caption\":\"codeflare\"},\"description\":\"Latest tech news and coding tips.\",\"sameAs\":[\"https:\\\/\\\/codeflarelimited.com\\\/blog\",\"https:\\\/\\\/facebook.com\\\/codeflretech\",\"https:\\\/\\\/instagram.com\\\/codeflaretech\",\"https:\\\/\\\/x.com\\\/codeflaretech\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCuBLtiYqsajHdqw0uyt7Ofw?sub_confirmation=1\"],\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/author\\\/watcher\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Real-time Data Search From API Using Search Bar Filter and ListView in React Native","description":"Real-time data search functionality can be very crucial for your React Native app, especially as it begins to scale","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/codeflarelimited.com\/blog\/real-time-data-search-from-api-using-search-bar-filter-and-listview-in-react-native\/","og_locale":"en_US","og_type":"article","og_title":"Real-time Data Search From API Using Search Bar Filter and ListView in React Native","og_description":"Real-time data search functionality can be very crucial for your React Native app, especially as it begins to scale","og_url":"https:\/\/codeflarelimited.com\/blog\/real-time-data-search-from-api-using-search-bar-filter-and-listview-in-react-native\/","article_author":"https:\/\/facebook.com\/codeflretech","article_published_time":"2021-12-14T05:04:39+00:00","article_modified_time":"2021-12-14T05:04:42+00:00","og_image":[{"width":1500,"height":750,"url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2021\/12\/Untitled-Design.jpeg","type":"image\/jpeg"}],"author":"codeflare","twitter_card":"summary_large_image","twitter_creator":"@codeflaretech","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"TechArticle","@id":"https:\/\/codeflarelimited.com\/blog\/real-time-data-search-from-api-using-search-bar-filter-and-listview-in-react-native\/#article","isPartOf":{"@id":"https:\/\/codeflarelimited.com\/blog\/real-time-data-search-from-api-using-search-bar-filter-and-listview-in-react-native\/"},"author":{"name":"codeflare","@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/person\/7e65653d49add95629f8c1053c5cd76a"},"headline":"Real-time Data Search From API Using Search Bar Filter and ListView in React Native","datePublished":"2021-12-14T05:04:39+00:00","dateModified":"2021-12-14T05:04:42+00:00","mainEntityOfPage":{"@id":"https:\/\/codeflarelimited.com\/blog\/real-time-data-search-from-api-using-search-bar-filter-and-listview-in-react-native\/"},"wordCount":426,"commentCount":0,"publisher":{"@id":"https:\/\/codeflarelimited.com\/blog\/#organization"},"image":{"@id":"https:\/\/codeflarelimited.com\/blog\/real-time-data-search-from-api-using-search-bar-filter-and-listview-in-react-native\/#primaryimage"},"thumbnailUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2021\/12\/Untitled-Design.jpeg","articleSection":["softare development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/codeflarelimited.com\/blog\/real-time-data-search-from-api-using-search-bar-filter-and-listview-in-react-native\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/codeflarelimited.com\/blog\/real-time-data-search-from-api-using-search-bar-filter-and-listview-in-react-native\/","url":"https:\/\/codeflarelimited.com\/blog\/real-time-data-search-from-api-using-search-bar-filter-and-listview-in-react-native\/","name":"Real-time Data Search From API Using Search Bar Filter and ListView in React Native","isPartOf":{"@id":"https:\/\/codeflarelimited.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/codeflarelimited.com\/blog\/real-time-data-search-from-api-using-search-bar-filter-and-listview-in-react-native\/#primaryimage"},"image":{"@id":"https:\/\/codeflarelimited.com\/blog\/real-time-data-search-from-api-using-search-bar-filter-and-listview-in-react-native\/#primaryimage"},"thumbnailUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2021\/12\/Untitled-Design.jpeg","datePublished":"2021-12-14T05:04:39+00:00","dateModified":"2021-12-14T05:04:42+00:00","description":"Real-time data search functionality can be very crucial for your React Native app, especially as it begins to scale","breadcrumb":{"@id":"https:\/\/codeflarelimited.com\/blog\/real-time-data-search-from-api-using-search-bar-filter-and-listview-in-react-native\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/codeflarelimited.com\/blog\/real-time-data-search-from-api-using-search-bar-filter-and-listview-in-react-native\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codeflarelimited.com\/blog\/real-time-data-search-from-api-using-search-bar-filter-and-listview-in-react-native\/#primaryimage","url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2021\/12\/Untitled-Design.jpeg","contentUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2021\/12\/Untitled-Design.jpeg","width":1500,"height":750,"caption":"React Native API Search"},{"@type":"BreadcrumbList","@id":"https:\/\/codeflarelimited.com\/blog\/real-time-data-search-from-api-using-search-bar-filter-and-listview-in-react-native\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/codeflarelimited.com\/blog\/"},{"@type":"ListItem","position":2,"name":"softare development","item":"https:\/\/codeflarelimited.com\/blog\/softare-development\/"},{"@type":"ListItem","position":3,"name":"Real-time Data Search From API Using Search Bar Filter and ListView in React Native"}]},{"@type":"WebSite","@id":"https:\/\/codeflarelimited.com\/blog\/#website","url":"https:\/\/codeflarelimited.com\/blog\/","name":"","description":"Sustainable solutions","publisher":{"@id":"https:\/\/codeflarelimited.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/codeflarelimited.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/codeflarelimited.com\/blog\/#organization","name":"Codeflare Limited","url":"https:\/\/codeflarelimited.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2020\/11\/codeflare.png","contentUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2020\/11\/codeflare.png","width":1040,"height":263,"caption":"Codeflare Limited"},"image":{"@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/person\/7e65653d49add95629f8c1053c5cd76a","name":"codeflare","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/59cef917c86d965eea581d2747f51bd6382003a68bfce7c8a4dfec98b4cd838d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/59cef917c86d965eea581d2747f51bd6382003a68bfce7c8a4dfec98b4cd838d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/59cef917c86d965eea581d2747f51bd6382003a68bfce7c8a4dfec98b4cd838d?s=96&d=mm&r=g","caption":"codeflare"},"description":"Latest tech news and coding tips.","sameAs":["https:\/\/codeflarelimited.com\/blog","https:\/\/facebook.com\/codeflretech","https:\/\/instagram.com\/codeflaretech","https:\/\/x.com\/codeflaretech","https:\/\/www.youtube.com\/channel\/UCuBLtiYqsajHdqw0uyt7Ofw?sub_confirmation=1"],"url":"https:\/\/codeflarelimited.com\/blog\/author\/watcher\/"}]}},"jetpack_featured_media_url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2021\/12\/Untitled-Design.jpeg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts\/813","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/comments?post=813"}],"version-history":[{"count":1,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts\/813\/revisions"}],"predecessor-version":[{"id":817,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts\/813\/revisions\/817"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/media\/816"}],"wp:attachment":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/media?parent=813"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/categories?post=813"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/tags?post=813"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}