Join us from October 8-10 in New York City to learn the latest tips, trends, and news about GraphQL Federation and API platform engineering.Join us for GraphQL Summit 2024 in NYC
Start for Free
You're viewing documentation for a previous version of this software. Switch to the latest stable version.

Integrating with React Native

You can use Apollo with React Native exactly as you would with React Web.

To introduce Apollo to your app, install React Apollo from npm and use them in your app as outlined in the setup article:

npm install @apollo/react-hooks apollo-client graphql --save
import React from 'react';
import { AppRegistry } from 'react-native';
import { ApolloClient } from 'apollo-client';
import { ApolloProvider } from '@apollo/react-hooks';
// Create the client as outlined in the setup guide
const client = new ApolloClient();
const App = () => (
<ApolloProvider client={client}>
<MyRootComponent />
AppRegistry.registerComponent('MyApplication', () => App);

If you are new to using Apollo with React, you should probably read the React guide.

Apollo Dev Tools

React Native Debugger supports the Apollo Client Devtools:

  1. Install React Native Debugger and open it.
  2. Enable "Debug JS Remotely" in your app.
  3. (Optional) If you do not see the Developer Tools panel or the Apollo tab is missing in them, toggle the Developer Tools by right clicking anywhere and selecting "Toggle Developer Tools".
View integrations
Integrating with Meteor
Rate articleRateEdit on GitHubEditForumsDiscord

© 2024 Apollo Graph Inc., d/b/a Apollo GraphQL.

Privacy Policy