Creating an App Using Github API
Explore how to connect your React Native app to external APIs by fetching user data from the GitHub API using Axios. Learn to handle API requests, manage state, and display user information dynamically. This lesson helps you build practical API integration skills in mobile application development.
We'll cover the following...
Introduction
We’ll use the public GitHub API in this project. Without going into too much detail about the UI elements in this lesson, we’ll focus on fetching the data from the API and displaying it on the page.
API endpoint
Endpoints are URLs we use to access our API. The endpoint we’ll be using is:
https://api.github.com/users/{username}
{
"12bb71342c6255bbf50437ec8f4441c083f47cdb74bd89160c15e4f43e52a1cb": true,
"40b842e832070c58deac6aa9e08fa459302ee3f9da492c7e77d93d2fbf4a56fd": true
}
Note: Once the server starts, click the URL next to “Your app can be found at:” to view the output.
States
The following states are used in this project:
username: The username of the user we