The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

React Native: fetch API introduction

React Native: fetch API introduction

4:20
The way you make HTTP requests in React Native is with the Fetch API. In this video we'll talk about Fetch and how to work with promises.
Watch this lesson now
Avatar
egghead.io

The way you make HTTP requests in React Native is with the Fetch API. In this video we'll talk about Fetch and how to work with promises.

Avatar
Jason

At the end of the video you mention that fetch isn't available for the browser yet, but it is available for React Native.

If I plan on writing a web app, (that also serves as a Hybrid Mobile App), that relies heavily on API calls, should I just stick to $.get(), or can I start using fetch?

Avatar
Tyler

Ironically Fetch went live a few days ago in the latest version of Chrome. But if you want ANY sort of older support, definitely go with $.get for now.

In reply to Jason
Avatar
Joel

Github has their fetch.js shim (which I used in the JSBin here).

In reply to Jason
HEY, QUICK QUESTION!
Joel's Head
Why are we asking?