Thanks to visit codestin.com
Credit goes to github.com

Skip to content

musatirgithub/pagination

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of contents

The challenge

Project focuses on showing github followers in a paginated structure

Problem Statement

  • Develop an app receiving github followers from github API, write a function to divide followers into pages, represent followers to users in a structure which allows users to navigate between pages

Screenshot

gif

Project Information

  • Pagination app is made by using React,
  • For showing designated number of followers at each page I've used Javascript Array.from method,
  • I've created a useFetch custom hook and got loading, error, repos from useFetch custom hook,
  • User can navigate between pages by either clicking page numbers or next, previous buttons.

I used;

  • React
  • Async functions
  • Custom, useState, useEffect hooks.

Lesson Learned

  • Javascript Array.from method is quite useful for turning an array into array of arrays. After exporting my array of arrays to Repos component I needed a two dependencies at my useEffect hook in order to rerender the page. By using loading ( comes from useFetch custom hook) and page states I've managed to rerender the page.

Useful resources

⌛ Happy Coding ✍

Releases

No releases published

Packages

No packages published