@fullstory/react-native

中文文档
1.10.3发布于 2026/09/11MITTypeScriptESM + CJS近 30 天下载 33.2万

The official FullStory React Native plugin

原始使用文档
文档目录8 节
  1. Quick Links
  2. React Native version compatibility
  3. Install the React Native plugin
  4. Configuring the babel plugin
  5. Importing the React Native plugin
  6. Importing Example
  7. Configuring for Expo
  8. Plugin Props

Fullstory React Native Plugin

CircleCI

Fullstory's React Native plugin exposes access to the Fullstory Native Mobile SDK from within a React Native app. This plug-in is intended to be used in conjunction with Fullstory for Mobile Apps.

React Native version compatibility

React Native version@fullstory/react-native version
>=0.83.0>=1.10.0
<=0.82.0~1.9.0

Install the React Native plugin

with npm

npm i @fullstory/react-native --save

with yarn

yarn add @fullstory/react-native

with expo-cli

expo install @fullstory/react-native

Configuring the babel plugin

@fullstory/babel-plugin-react-native is automatically included as a dependency to the Fullstory React Native plugin. Please refer to the babel plugin's README.md for information on how to configure it.

@fullstory/babel-plugin-annotate-react is automatically included as a dependency to the Fullstory React Native plugin. Please refer to the babel plugin's README.md for information on how to configure it for React Native.

Importing the React Native plugin

In order to use the Fullstory Native Mobile SDK from within a React Native app, importing the React Native plugin is all that is required.

Importing Example

Here's an example of importing the SDK in a React Native app.

import Fullstory from '@fullstory/react-native';

Configuring for Expo

This package cannot be used in the "Expo Go" app because it requires custom native code.

Add the config plugin to the plugins array of your app.json or app.config.json

{
  "expo": {
    "plugins": [
      [
        "@fullstory/react-native",
        {
          "version": "1.28.0",
          "org": "ABC",
          "additionalConfigs": {
            "ios": {
              "PreviewMode": true
            },
            "android": {
              "previewModeEnabled": false
            }
          }
        }
      ]
    ]
  }
}

Plugin Props

Plugins allow for extra customization by passing in an object with properties. If no extra properties are added, defaults will be used. Certain properties are required.

PropertyPlatformRequiredDescription
versionAndroid & iOS✅Fullstory for Mobile Apps plugin version.
orgAndroid & iOS✅Your assigned organization ID.
hostAndroid & iOSOptional. Defaults to: fullstory.comThe server url your sessions are sent to.
recordOnStartAndroid & iOSOptional. Defaults to: trueSetting RecordOnStart to false will prevent data capture until you explicitly invoke FS.restart() API.
additionalConfigsAndroid & iOSOptional. Defaults to: nilPass additional configurations to Android or iOS.
enabledVariantsAndroidOptional. Defaults to: releaseSpecifies which variants to apply Fullstory instrumentation.
logLevelAndroidOptional. Defaults to: infoCaptures any log statements at or above the specified level.
logcatLevelAndroidOptional. Defaults to: offCaptures any Logcat messages at or above the specified level.
includeAssetsiOSOptional. Defaults to: nilSpecify webview file types to upload for playback. This is strongly recommended if you intend to capture WebViews.
infoPlistPathiOSOptional. Defaults to: nilSpecify the location of your info.plist file in case we cannot find it automatically in the app bundle. Suggested value: "${SRCROOT}/${INFOPLIST_FILE}"

版本与发布记录

@fullstory/react-native 共发布 45 个版本,首次发布于 2020/04/09;过去 12 个月发布了 8 个版本。

版本发布日期距今
1.10.3latest2026/09/112 个月前
1.9.12026/09/112 个月前
1.10.22026/07/303 个月前
1.10.12026/07/084 个月前
1.10.02026/07/084 个月前
1.9.02026/03/187 个月前

关于 @fullstory/react-native 的常见问题

@fullstory/react-native 是什么?

The official FullStory React Native plugin

如何安装 @fullstory/react-native?

在项目目录运行 npm install @fullstory/react-native,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(*)、react-native(>=0.83.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@fullstory/react-native 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@fullstory/react-native 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@fullstory/react-native 可以商用吗?

@fullstory/react-native 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@fullstory/react-native 的下载量有多少?

根据 npm 官方下载统计,@fullstory/react-native 在 2026/10/16 – 2026/11/14 这 30 天内被下载 332,233 次,日均约 11,074 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@fullstory/react-native 还在维护吗?

最新版本 1.10.3 发布于 2026/09/11(2 个月前);至今共发布 45 个版本,其中过去 12 个月发布了 8 个;首次发布于 2020/04/09。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。