Getting Started with React Native

PubNub's React framework allows you to use PubNub's JavaScript SDK features within a React Native application.

Requirements

To use the PubNub React framework, you need:

PubNub account

Sign in or create an account to create an app on the Admin Portal and get the keys to use in your application.

When you create a new app, the first set of keys is generated automatically, but a single app can have as many keysets as you like. We recommend that you create separate keysets for production and test environments.

Download the React Native wrapper

  1. Clone parent repository and enter the examples/reactnative directory.

    1git clone https://github.com/pubnub/react
    2cd react/examples/reactnative
  2. Install dependencies:

    1npm install
  3. Run the emulator:

    1# for Android:
    2npm run android
    3
    4# for iOS:
    5npm run ios
Last updated on