| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This project has 2 pages
The Search Page A very simple page with one input for the username that will be used in the request to the GitHub API. The request will be triggered by clicking the "Search GitHub Users" button.
The User Page If the Search for GitHub users returned any items (users) you will see this page Here we can find:
NOTE: A personal GitHub token with very limited access is included, but When this repository became public that Token was revoked by GitHub due to security reasons, so if you want for the API calls to work properly, please get a GitHub Token and replace the one that can be found inside the App.js file.
This is my first React project, so it's most likely that the React way of organizing code isn't the best.
The main goal was to display one user info, but the API response usually returns thousands, or hundreds, of users with a simple request, so I've decided to allow the user to see more than one user data. For each user request we get 30 users, so this data is used to fulfill an array of users that we can display whitout more requests. And after we reach the 30th user, another API user search request is triggered, and another 30 users are loaded (limited to approximately 1000 users in total). To manage this additional requests and load different user data, a per_page variable was added, which is increased at every request for additional 30 users.
When the user data is displayed, at it's change, another API request is triggered to get the user repositories.
-- This project was bootstrapped with Create React App.
Two automated Tests were developed, one for each page
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
Launches the test runner in the interactive watch mode.\
Serve the builded application.
| Back | FazBrowse Home | New Git URL |