Socket
Socket
Sign inDemoInstall

react-native-algolia-dropdown

Package Overview
Dependencies
23
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-native-algolia-dropdown

Real time dropdown search for Algolia with React Native


Version published
Maintainers
1
Install size
2.19 MB
Created

Readme

Source

react-native-algolia-dropdown

This component is rad. I just haven't had time to document it. If you're using Algolia with React Native and you need an Instagram-ish search bar (with dropdown results), hit me up on Twitter and I'll walk you through it. @tylermcginnis33

##Example

<AlgoliaDropdown
  appID={algoliaConfig.APP_ID}
  style={{backgroundColor: colors.tabPrimary, borderBottomWidth: 1, borderColor: colors.border, paddingTop: Platform.OS === 'ios' ? 25 : 0}}
  footerHeight={64}
  sideComponent={<Filter onPress={this.handleFilterPress} width={this.state.filterWidth} />}
  apiKey={algoliaConfig.SEARCH_API}>
    <UserPreview
      index='users'
      title='People'
      params={{hitsPerPage: 3}}
      onToProfile={(userId) => this.handleToProfile(userId)}
      small={true} />
    <PostSearchContainer
      navigator={this.props.navigator}
      index='posts'
      title='Public Posts'
      params={{hitsPerPage: 3}} />
</AlgoliaDropdown>
Renders this

React Native Algolia Dropdown

Usage

The index prop on children components of AlgoliaDropdown link an Algolia index with a specific component. This components render method is responsible for displaying an individual hit, each hit is passed down into children components through a prop called 'data'. The UserPreview render() method may look something like this:

render(){
  return(
    <Text>{this.props.data.username}</Text>
  );
}

Keywords

FAQs

Last updated on 22 Nov 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc