GithubHelp home page GithubHelp logo

Comments (3)

monkfromearth avatar monkfromearth commented on August 10, 2024 1

Self-assigning myself for this issue.

A good quick way to fix this would be adding a button for more, which is rendered only when the user's user.public_repos > page_number * 100.

Here, page_number, initially 1 is the current page number.

A simple fetch request can be made, and the data can be appended to the repos state.

from gitzilla.

ChoukseyKhushbu avatar ChoukseyKhushbu commented on August 10, 2024 1

Self-assigning myself for this issue.

A good quick way to fix this would be adding a button for more, which is rendered only when the user's user.public_repos > page_number * 100.

Here, page_number, initially 1 is the current page number.

A simple fetch request can be made, and the data can be appended to the repos state.

Glad to see your suggestion but I already started working on this issue. It will be fixed soon.
Thank you! 😄

from gitzilla.

ChoukseyKhushbu avatar ChoukseyKhushbu commented on August 10, 2024

Hi Max,
I knew about this (from the GitHub documentation) when I started working on GitZilla.
But I took it lightly as I didn't know GitZilla will get such an amazing response from the dev community.
Also, another reason is fetching all the repositories at a time will increase the loading time which will not result in good user experience. Hence I thought to just limit to single page.

This is my current code in src/components/User.jsx -
image

Thanks for finding out this issue and reminding me again and giving an example.
I will look into it and fix this very soon.
I am thinking of something like fetching 100 repositories first and show them first and then fetching more as the user scrolls down. This will decrease the loading time.

But I am not very sure. As I don't know much about pagination and fetching. I am a beginner in react and working with API too.

Please suggest your views on this.

Thank you.

from gitzilla.

Related Issues (14)

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.