Project focuses on showing github followers in a paginated structure
- 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
- 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.
- 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.