Join Samer Buna for an in-depth discussion in this video Using the Fetch API, part of React Native Essential Training.
- [Instructor] We're ready to fetch the data and…see what we're working with.…I'll create a new file under Source,…and call this file ajax.js.…And this is the file where we're going to do…all the Ajax requests that are to be used by the app.…So we'll export a default object here that is our API.…And in this default object we'll define functions…responsible for fetching different types of data.…
So let's define the first function.…We're interested in fetching the initial deals,…so I'm going to call this function fetchInitialDeals.…In this function, we want to do an Ajax…request to the Bakesale API.…We can use the fetch library to do that.…The fetch library comes built in React Native,…so we don't need to import anything.…And you can see the documentation for the Fetch API…under the React Native website.…So you do fetch, the default method is get,…but you can change it if you need to.…
Once you have the initial response,…you can convert the initial response to Json,…and then you can use that Json object…returned from the server.…
- Hello React Native on iOS and Android
- Styling React Native components
- Platform APIs
- Building a simple game app and a data-driven app
- Using the Fetch API
- Creating an animation loop
- Testing on Android
- Changing an app logo and a splash screen
- Using TestFlight with internal testers
Skill Level Intermediate
1. Getting Started
2. React Native Fundamentals
Hello React Native on iOS5m 42s
3. Building a Simple Game App
4. Building a Data-driven App
5. Animation and Gesture Control
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.