https://github.com/tsaidavid/vanilla-search-autocomplete
A vanilla JS implementation of a search w/ autocomplete
https://github.com/tsaidavid/vanilla-search-autocomplete
codesandbox javascript parcel search vanilla vanilla-javascript
Last synced: about 1 year ago
JSON representation
A vanilla JS implementation of a search w/ autocomplete
- Host: GitHub
- URL: https://github.com/tsaidavid/vanilla-search-autocomplete
- Owner: tsaiDavid
- Created: 2018-08-22T18:43:11.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-22T19:44:17.000Z (almost 8 years ago)
- Last Synced: 2025-02-09T23:51:19.493Z (over 1 year ago)
- Topics: codesandbox, javascript, parcel, search, vanilla, vanilla-javascript
- Language: JavaScript
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vanilla-search-autocomplete
A vanilla JS implementation of a search w/ autocomplete
**Demo:**
[](https://codesandbox.io/s/github/tsaiDavid/vanilla-search-autocomplete/tree/master/)
## Features
- Good ol' vanilla JavaScript
- `parcel` for bundling
- *Debounced* input event handler
- A simple mocked API call (`searchData`) for movie titles and ratings
- `searchData() -> Promise`
## Thoughts
More times than not, focusing on the end user experience pushes you towards considering performance optimizations: a win-win.
In this case, we *debounced* the input event handler, which better helps us manage the number of calls, but also ensures a
more consistent experience for the user. Depending on your use case, you'll want to fine tune and experiment with the duration.