Skip to content

Instantly share code, notes, and snippets.

@leofab86
Last active May 17, 2019 05:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leofab86/830dc7f862e57764fbd95cfe06eda371 to your computer and use it in GitHub Desktop.
Save leofab86/830dc7f862e57764fbd95cfe06eda371 to your computer and use it in GitHub Desktop.
Fuzzy search autocomplete v1.0.0
getSearchResults = () => {
const {searchTerm} = this.state;
return searchTerm ? this.searchEngine.search(searchTerm) : []
// searchEngine.search is the expensive search algorithm
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment