Skip to content

fullstorydev/fullstory-babel-plugin-react-native

Repository files navigation

FullStory React Native Babel Plugin

CircleCI

FullStory's React Native babel plugin performs transformations to enable FullStory privacy state declarations on all React Native controls, in addition to adding support for capturing click events.

This plugin does not replace @fullstory/babel-plugin-annotate-react, which annotates React components with stable attributes to help with element identity.

This plugin should only be used in conjunction with @fullstory/react-native.

This plug-in is intended to be used in conjunction with FullStory for Mobile Apps. For more information, please see this getting started guide. Email [email protected] for additional help.

Install the React Native babel plugin

Note: this babel plugin is automatically installed as a dependency to @fullstory/react-native

with npm

npm i @fullstory/babel-plugin-react-native --save

with yarn

yarn add @fullstory/babel-plugin-react-native

Enabling the React Native plugin

The FullStory React Native babel plugin is required to be enabled in order for FullStory to fully work with React Native.

babel.config.js Example

module.exports = {
  presets: ['module:metro-react-native-babel-preset'],
  plugins: ['@fullstory/react-native'],
};

About

Official FullStory plugin for Babel React-Native, for native mobile

Resources

License

Stars

Watchers

Forks

Packages

No packages published