12 Building a Star Wars app using cross-platform components
This chapter covers
- The basics of fetching data using the Fetch API
- Using a
Modal
component to show and hide views - Creating a list using the
FlatList
component - Using the
ActivityIndicator
to show loading state - Using React Navigation in a real-world project to handle navigation
React Native ships with many components that are ready to use in your apps. Some of these components work cross-platform: that is, they work regardless of whether you’re running an app on iOS or Android. Other components are platform-specific: for example, ActionSheetIOS
only runs on iOS, and ToolbarAndroid
only runs on the Android platform (cross-platform components were covered in Chapters 10 and 11).
This chapter covers some of the most-used cross-platform components and how to implement each one as you build a demo application. For this purpose, you’ll implement the following cross-platform components and APIs by building a cross-platform Star Wars information app:
- Fetch API
Modal
ActivityIndicator
FlatList
Picker
React-Navigation