| .. | ||
| .yarn | ||
| android | ||
| example | ||
| ios | ||
| src | ||
| .editorconfig | ||
| .gitignore | ||
| .nvmrc | ||
| .watchmanconfig | ||
| .yarnrc | ||
| .yarnrc.yml | ||
| app.plugin.js | ||
| babel.config.js | ||
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.md | ||
| lefthook.yml | ||
| LICENSE | ||
| openreplay-react-native.podspec | ||
| package.json | ||
| README.md | ||
| tsconfig.build.json | ||
| tsconfig.json | ||
| turbo.json | ||
@openreplay/react-native
Openreplay React-native connector for mobile applications.
Installation
npm install @openreplay/react-native
Please 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