Giter Club home page Giter Club logo

latest-starred-github-repos's Introduction

Latest Starred Github Repos

Web app that lists the most starred Github repos that were created in the last 30 days.

Technology Used in this project:

  • Javascript (React)
  • HTML/CSS

Why React?

I used React in this project for the following reasons:

  • I'm already familiar with the library.
  • React is considered one of the most used front-end libraries/frameworks in today's web apps and has a community of millions of developers.
  • I would have used Angular, But in this case it was going to be an overkill since Angular comes with a full package of features that are not required for this project.

Project details:

The app consist of a list of repos fetched from Github API. By default, it will fetch the most starred repos in the last 30 days which you can change by passing a number (of days) value to fetchRepos(page = 1, durationInDays = 30) in "./Utilities/fetchRepos.js".

In App.js we are using a useFetch hook that will fetch repos when the page state value changes.

We are implementing an infinite scroll by only loading pages when the user scrolls down and reach the bottom of the page. A onscroll event is handled inside App component that updates the page value which in return will trigger the useFetch to load and append new data.

Note: We're wrapping the event handler function in debounce (a module from lodash library) to prevent the event handler from executing multiple times in fraction of a second.

Without debounce alt text With debounce alt text

fetchRepos.js utility also contains a filterRepos function that will extract only relevant data to be displayed.

Thank you!

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.