This Expo project is a simple React Native application that demonstrates how to connect to an external API using Axios. The app is designed to fetch and display contact information from a HubSpot CRM, showcasing the basic functionality of an HTTP GET request in a mobile application environment. Additionally, it incorporates functionalities for accessing device contacts and current location tracking using Expo modules.
- Axios Integration: Demonstrates how to use Axios to make API calls from a React Native application.
- GET Request: Fetches contact information from our university's HubSpot CRM server.
- Contact Information Display: The retrieved contact data is displayed within the mobile app's user interface.
- Expo Contacts Module: Access and manage the device's contacts on iOS, allowing you to retrieve detailed contact information or perform actions like creating, updating, or deleting contacts.
- Expo Location Module: Integrates maps and detects the user's current location, enabling real-time location tracking with easy access to geographic coordinates.
- Simple & Clean Code: Ideal for beginners looking to understand the basics of API integration and device capabilities in a mobile setting.
This example serves as a foundational project for those looking to learn how to connect React Native applications to external APIs, particularly for fetching and displaying data. Additionally, it provides insights into utilizing Expo modules to interact with device contacts, current location, and native maps enhancing the functionality of mobile applications.
This is an Expo project created with create-expo-app
.
-
Install dependencies
npm install
-
Start the app
npx expo start
In the output, you'll find options to open the app in a
- development build
- Android emulator
- iOS simulator
- Expo Go, a limited sandbox for trying out app development with Expo
You can start developing by editing the files inside the app directory. This project uses file-based routing.
When you're ready, run:
npm run reset-project
This command will move the starter code to the app-example directory and create a blank app directory where you can start developing.
To learn more about developing your project with Expo, look at the following resources:
- Expo documentation: Learn fundamentals, or go into advanced topics with our guides.
- Learn Expo tutorial: Follow a step-by-step tutorial where you'll create a project that runs on Android, iOS, and the web.
Join our community of developers creating universal apps.
- Expo on GitHub: View our open source platform and contribute.
- Discord community: Chat with Expo users and ask questions.