@openreplay/react-native
v0.6.17
Published
Openreplay React-native connector for iOS applications
Readme
@openreplay/react-native
Openreplay React-native connector for mobile applications.
Installation
npm install @openreplay/react-nativePlease see the documentation for more information about usage.
React Native and GraphQL
You can use @openreplay/tracker-graphql to handle graphql events in react-native applications as well, via
import { createRelayMiddleware } from '@openreplay/tracker-graphql';
const appWrapper = {
active: () => true,
send: (gqlMsg) => {
const type = 'gql';
const msg = JSON.stringify({
operationKind: gqlMsg[1],
operationName: gqlMsg[2],
variables: gqlMsg[3],
response: gqlMsg[4],
duration: gqlMsg[5],
});
Openreplay.sendCustomMessage(type, msg);
},
};
// @ts-ignore - emulating web tracker here for middleware
const middleware = createRelayMiddleware(appWrapper);
// .. connect to relay network layer