Demo Application
Let's explore the use of the GitHub REST API with the help of a ReactJS application.
We'll cover the following
We’ll use React, a JavaScript framework, to implement an application that uses the GitHub REST API. We’ve implemented some of the endpoints in this course to perform operations on repositories, projects, and search features.
Workflow
When we run the application, the first page we see is the home page. The home page has a main component using the API endpoints—the navigation bar.
The various options shown on the top-left side of the webpage are discussed below:
“Repositories” shows a drop-down menu which contains the list with the following options:
Create Repository
Update Repository Name
Delete Repository
List Repositories
Create Repository Project
List Repository Projects
List Branches
List Commits
List Collaborators
"Projects" shows a drop-down menu which contains the list with the following options:
Create a User Project
List User Project
There is a search bar on the top-right side of the webpage for the user to search for existing repositories.
Search
Search repositories
/src/components/layout/MyNav.js
(lines 12–41)
Demo application
The demo application can be run by clicking the “Run” button in the widget below. The application can be viewed by clicking the link given against "Your app can be found at:" at the bottom of the widget.
Note: The following widget only shows the necessary files required to run the application on our platform.
Get hands-on with 1400+ tech skills courses.