Having a real-time connection with a server is crucial when you're developing a real-time messaging application as you want your users to receive their messages as soon as they are sent. What you might have experienced in the previous two chapters is that mobile applications are more intuitive to use than web applications. When you want users to send messages back-and-forth, this is best done by building a mobile application, which you'll do in this chapter.
In this chapter, you'll create a real-time mobile messaging application using React Native and Expo that connects with a GraphQL server. By using WebSockets, you can create real-time connections with a server for web and mobile applications and have a two-way data flow between your application and a GraphQL server. This connection can also...