Skip to content

Instantly share code, notes, and snippets.

@hrishioa
Created December 6, 2021 08:21
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 hrishioa/4bb65ac16ba78837a8d07ad440c68333 to your computer and use it in GitHub Desktop.
Save hrishioa/4bb65ac16ba78837a8d07ad440c68333 to your computer and use it in GitHub Desktop.
/**
*
* Task: Implement typeahead, suggestions and command search for cats using https://cataas.com/#/.
*
* Subtask 1: Implement a search box for users to search for cats by a tag, using `/cat/:tag`. Results should show the picture of the cat
* and the description. Example search `angry` -> API call would be https://cataas.com/cat/angry -> Picture of angry cat
*
* Subtask 2: Implement typeahead and suggestions for past searches (can be extended to common words from https://www.wordsapi.com/)
*
* Subtask 3: Implement command search, where users can type in `{cat type} says Hello`, and the returned picture uses this to call `/cat/:tag/says/:text`.
*
* (Optional) Subtask 4: Implement suggestions and typeahead for 3.
*
* Requirements: Use React and hooks to implement components, with a focus on responsiveness and load times. Frontend design is left up to implementation,
* use your discretion. Responses can be in Codepen (or other live editors), or uploaded to Github.
*
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment