/netsearch

The demo to search my Github content with debounce, throttle, and pagination.

Primary LanguageTypeScriptMIT LicenseMIT

netsearch

The demo to search my Github content with debounce, throttle, and pagination.

Using React, Typescript, vite, SCSS with CSS Module, react-query, Antd.

Feature

  • Enabled us to search with one keyword.
  • Search input is debounced.
  • Search request is throttled.
  • Including the pagination inside the request.
  • If there are any changes during the throttled period, it could be auto-triggered once (no more) later.
  • The cache policy could be customized as well.

Access from the link: https://ibarapascal.github.io/netsearch/#/search

Screen Shot 2022-12-21 at 23 53 56

Related info

About the Github REST API search code

For unauthenticated requests, the rate limit allows you to make up to 10 requests per minute.

per_page: The number of results per page (max 100).

Visualization

  • file structure

file structure

Todos

  • adjust the throttle UX maybe with masks styles
  • deploy to Github Pages
  • update the README
  • update lints