react-native-zendesk icon indicating copy to clipboard operation
react-native-zendesk copied to clipboard

RNZendesk is null

Open marciok opened this issue 5 years ago • 1 comments

Hi, I'm using RN 0.60.5. And installed using npm install --save react-native-zendesk, but when I call RNZendesk I get null, example:

const { RNZendesk } = NativeModules;

  componentWillMount(){
    const config = {
      appId: 'abc123',
      zendeskUrl: 'https://foo.zendesk.com',
      clientId: 'mobile_sdk_client_123456'
    };

    console.warn(RNZendesk)
  }

PS: I only tried on iOS.

marciok avatar Nov 12 '19 19:11 marciok

I think the correct way to call is

import * as RNZendesk from "react-native-zendesk";
     
RNZendesk.initialize({
    appId: 'abc123',,
    clientId: 'https://foo.zendesk.com',
    zendeskUrl: 'mobile_sdk_client_123456'
});

pentolbakso avatar Nov 21 '19 08:11 pentolbakso