Git Product home page Git Product logo

github-repo-list's Introduction

Live demo

https://adoring-jennings-f809ce.netlify.app/ demo

How to run this project in local environment

  1. install Node.js package manager yarn or npm
  2. install dependencies through yarn or npm
yarn

or

npm install
  1. start development server
yarn dev

or

npm run dev
  1. build and start production server
yarn build
yarn start

or

npm run build
npm start

Flow Chart

  • UI UI
  • input change input change
  • intersection change intersection change

Description

Folder structure

  • Define components, hooks, and util functions in a folder as a module.
  • Reusable components, hooks, and util functions would be defined in the sibling folders of other module folders.

Reusable components

  • Use styled-system to unify style property name of reusable components.

Type safe

  • Generate types of github api through openapi-typescript to ensure type safety when access data of github api responses.
  • Exhaustive match through ts-pattern to ensure all input types would be handled in compile time.

Styling

  • Use one of the css-in-js solutions, styled-components to add style to components to avoid css class name naming collision and polyfill styled cross different browsers.

Debounce

  • Reduce the update frequency of fetch urls to avoid too many requests sent in a short time.

Infinite scroll

  • Update trigger condition of the github next page repositories through IntersectionObserver apis.

License

MIT

github-repo-list's People

Contributors

yongyuh avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.