Chapter    6

Communicating with Servers

“Communication is everyone’s panacea for everything.”

—Tom Peters

After learning about the powers of device capabilities via multiple examples, it’s time to get back to your housing application. So far, you have been populating your app locally with some dummy data, but no application can survive without communicating with a server. In this chapter, you will learn how to interact with network APIs. You will explore the following topics:

  • XMLHttpRequest
  • WebSocket
  • Fetch
  • Getting data from a server
  • Posting data to a server

Earlier you were getting all the data from a dummy data object, which was static within your application. It’s a rare chance any production application will entirely work with static data. ...

Get React Native for iOS Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.