A development tool to explore, inspect, and diagnose your React Native apps.
—
Core client interface for configuring Reactotron with React Native specific settings, plugin management, and connection options.
The primary ReactotronReactNative interface extends the core Reactotron client with React Native specific functionality.
/**
* Main Reactotron React Native client interface
*/
interface ReactotronReactNative extends Reactotron {
/** Configure React Native specific plugins and features */
useReactNative(options?: UseReactNativeOptions): this;
/** Set AsyncStorage handler for client ID persistence */
setAsyncStorageHandler(asyncStorage: AsyncStorageStatic): this;
/** Current AsyncStorage handler instance */
asyncStorageHandler?: AsyncStorageStatic;
}Configure which React Native specific plugins should be enabled.
/**
* Configuration options for React Native specific features
*/
interface UseReactNativeOptions {
/** Enable global error tracking with optional configuration */
errors?: TrackGlobalErrorsOptions | boolean;
/** Enable global console log tracking */
log?: boolean;
/** Enable editor integration with optional configuration */
editor?: OpenInEditorOptions | boolean;
/** Enable debug overlay */
overlay?: boolean;
/** Enable AsyncStorage tracking with optional configuration */
asyncStorage?: AsyncStorageOptions | boolean;
/** Enable network request tracking with optional configuration */
networking?: NetworkingOptions | boolean;
/** Enable Storybook integration */
storybook?: boolean;
/** Enable dev tools integration */
devTools?: boolean;
}Usage Examples:
import Reactotron from "reactotron-react-native";
// Enable all plugins with defaults
const reactotron = Reactotron
.configure({ name: "MyApp" })
.useReactNative()
.connect();
// Selective plugin configuration
const reactotron = Reactotron
.configure({ name: "MyApp" })
.useReactNative({
errors: { veto: (frame) => !frame.fileName.includes('node_modules') },
networking: { ignoreUrls: /localhost/ },
asyncStorage: { ignore: ['persist:root'] },
overlay: true,
devTools: true,
storybook: false
})
.connect();
// Disable specific plugins
const reactotron = Reactotron
.configure({ name: "MyApp" })
.useReactNative({
errors: false, // Disable error tracking
log: false, // Disable log tracking
networking: true
})
.connect();Set up AsyncStorage for client ID persistence across app restarts.
/**
* Set AsyncStorage handler for client ID persistence
* @param asyncStorage - AsyncStorage implementation
* @returns ReactotronReactNative instance for chaining
*/
setAsyncStorageHandler(asyncStorage: AsyncStorageStatic): this;Usage Examples:
import AsyncStorage from "@react-native-async-storage/async-storage";
import Reactotron from "reactotron-react-native";
const reactotron = Reactotron
.setAsyncStorageHandler(AsyncStorage)
.configure({ name: "MyApp" })
.useReactNative()
.connect();Pre-defined array of all React Native plugins with default configurations.
/**
* Array of default React Native plugins
*/
const reactNativeCorePlugins: PluginCreator<ReactotronCore>[];/**
* Default client options for React Native
*/
interface DefaultClientOptions {
createSocket: (path: string) => WebSocket;
host: string; // Auto-detected from React Native dev server
port: number; // Default: 9090
name: string; // Default: "React Native App"
environment: string; // Auto-detected from NODE_ENV
client: {
reactotronLibraryName: string;
reactotronLibraryVersion: string;
platform: string; // iOS or Android
platformVersion: string | number;
reactNativeVersion: string | null;
screenWidth: number;
screenHeight: number;
screenScale: number;
// Additional platform-specific constants
};
getClientId: (name?: string) => Promise<string>;
setClientId: (clientId: string) => Promise<void>;
proxyHack: boolean; // Default: true
}Install with Tessl CLI
npx tessl i tessl/npm-reactotron-react-native