Convert Figma logo to code with AI

infinitered logoreactotron

A desktop app for inspecting your React JS and React Native projects. macOS, Linux, and Windows.

14,811
941
14,811
169

Top Related Projects

13,311

A desktop debugging platform for mobile developers.

The standalone app based on official debugger of React Native, and includes React Inspector / Redux DevTools

DevTools for Redux with hot reloading, action replay, and customizable UI

An extension that allows inspection of React component hierarchy in the Chrome and Firefox Developer Tools.

Redux DevTools extension.

Quick Overview

Reactotron is a desktop app for inspecting and debugging React and React Native apps. It provides a powerful set of tools for monitoring state changes, API requests, and performance metrics, making it easier for developers to troubleshoot and optimize their applications.

Pros

  • Easy to set up and integrate with existing React and React Native projects
  • Provides real-time monitoring of app state, Redux actions, and API calls
  • Offers a user-friendly interface for viewing and manipulating app data
  • Supports custom plugins for extended functionality

Cons

  • Limited to React and React Native ecosystems
  • Requires additional setup for more advanced features
  • May impact app performance when used extensively in development
  • Learning curve for utilizing all available features effectively

Code Examples

  1. Basic setup for a React Native app:
import Reactotron from 'reactotron-react-native'

Reactotron
  .configure() // controls connection & communication settings
  .useReactNative() // add all built-in react native plugins
  .connect() // let's connect!
  1. Logging with Reactotron:
import Reactotron from 'reactotron-react-native'

Reactotron.log('Hello, world!')
Reactotron.warn('This is a warning')
Reactotron.error('Something went wrong', { details: 'Error details' })
  1. Redux integration:
import Reactotron from 'reactotron-react-native'
import { reactotronRedux } from 'reactotron-redux'

Reactotron
  .configure()
  .useReactNative()
  .use(reactotronRedux()) // add redux plugin
  .connect()

// Later, in your Redux store configuration:
const store = createStore(
  rootReducer,
  Reactotron.createEnhancer()
)

Getting Started

  1. Install Reactotron:

    npm install --save-dev reactotron-react-native
    
  2. Create a ReactotronConfig.js file in your project:

    import Reactotron from 'reactotron-react-native'
    
    Reactotron
      .configure() // controls connection & communication settings
      .useReactNative() // add all built-in react native plugins
      .connect() // let's connect!
    
    export default Reactotron
    
  3. Import the config file in your app's entry point (e.g., index.js):

    if (__DEV__) {
      import('./ReactotronConfig').then(() => console.log('Reactotron Configured'))
    }
    
  4. Run your app and launch the Reactotron desktop application to start debugging.

Competitor Comparisons

13,311

A desktop debugging platform for mobile developers.

Pros of Flipper

  • More comprehensive debugging platform with support for multiple platforms (iOS, Android, React Native)
  • Extensible plugin architecture allowing developers to create custom plugins
  • Integrated network inspection and device logs viewing

Cons of Flipper

  • Steeper learning curve due to more complex features and setup
  • Heavier resource usage, which may impact performance on lower-end devices
  • Less focused on React Native specific debugging compared to Reactotron

Code Comparison

Reactotron setup:

import Reactotron from 'reactotron-react-native'

Reactotron
  .configure()
  .useReactNative()
  .connect()

Flipper setup:

import { addPlugin } from 'react-native-flipper';
import { NetworkPlugin } from 'flipper-plugin-network';

addPlugin(new NetworkPlugin());

Summary

Flipper offers a more comprehensive debugging solution for multiple platforms, with an extensible plugin system and integrated network inspection. However, it comes with a steeper learning curve and potentially higher resource usage. Reactotron, on the other hand, provides a more focused and lightweight debugging experience specifically for React Native applications, with easier setup and lower overhead. The choice between the two depends on the specific needs of the project and the developer's preferences for debugging tools.

The standalone app based on official debugger of React Native, and includes React Inspector / Redux DevTools

Pros of React Native Debugger

  • Integrated Redux DevTools for enhanced state management debugging
  • Built-in React DevTools for component inspection and profiling
  • Network request monitoring and inspection capabilities

Cons of React Native Debugger

  • Limited customization options compared to Reactotron
  • Lacks some advanced features like custom commands and plugins
  • May have a steeper learning curve for beginners

Code Comparison

React Native Debugger:

import { connectToDevTools } from 'react-native-debugger';

connectToDevTools();
// No additional setup required for basic debugging

Reactotron:

import Reactotron from 'reactotron-react-native';

Reactotron
  .configure()
  .useReactNative()
  .connect();

Summary

React Native Debugger offers a comprehensive debugging solution with integrated Redux and React DevTools, making it ideal for developers who need powerful state management and component inspection capabilities. However, it may lack some of the customization options and advanced features found in Reactotron.

Reactotron, on the other hand, provides more flexibility and extensibility through custom commands and plugins. It's generally easier to set up and use, making it a good choice for beginners or projects that require specific debugging workflows.

Both tools have their strengths, and the choice between them often depends on the specific needs of the project and the developer's preferences.

DevTools for Redux with hot reloading, action replay, and customizable UI

Pros of Redux DevTools

  • Deeply integrated with Redux, offering more specialized features for Redux state management
  • Provides time-travel debugging, allowing developers to move back and forth through state changes
  • Offers a browser extension, making it easily accessible for web development

Cons of Redux DevTools

  • Primarily focused on Redux, limiting its usefulness for non-Redux projects
  • Can be more complex to set up and configure, especially for beginners
  • May have performance impacts on larger applications due to its state tracking

Code Comparison

Redux DevTools setup:

import { createStore, applyMiddleware, compose } from 'redux';
import rootReducer from './reducers';

const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
const store = createStore(rootReducer, composeEnhancers(applyMiddleware()));

Reactotron setup:

import Reactotron from 'reactotron-react-native';

Reactotron
  .configure()
  .useReactNative()
  .connect();

Key Differences

  • Reactotron is more versatile, supporting React Native and general JavaScript debugging
  • Redux DevTools is more specialized for Redux state management
  • Reactotron offers a standalone app interface, while Redux DevTools is primarily a browser extension
  • Reactotron provides more general-purpose debugging features, including network request monitoring
  • Redux DevTools excels in time-travel debugging and detailed Redux action inspection

An extension that allows inspection of React component hierarchy in the Chrome and Firefox Developer Tools.

Pros of React DevTools

  • Official React debugging tool developed and maintained by Facebook
  • Seamless integration with React's component hierarchy and state management
  • Supports both React DOM and React Native applications

Cons of React DevTools

  • Limited to React-specific debugging and inspection
  • May not provide as detailed network and API call information as Reactotron
  • Less customizable for specific project needs

Code Comparison

React DevTools:

import React from 'react';
import { createDevTools } from 'redux-devtools';
import LogMonitor from 'redux-devtools-log-monitor';

const DevTools = createDevTools(<LogMonitor />);

Reactotron:

import Reactotron from 'reactotron-react-js';
import { reactotronRedux } from 'reactotron-redux';

Reactotron
  .configure()
  .use(reactotronRedux())
  .connect();

React DevTools focuses on integrating with React's ecosystem, while Reactotron offers a more flexible approach to debugging and monitoring various aspects of React applications, including state management, API calls, and performance metrics. React DevTools is better suited for developers primarily working within the React ecosystem, whereas Reactotron provides a broader set of debugging tools that can be customized for specific project requirements.

Redux DevTools extension.

Pros of Redux DevTools Extension

  • Browser-based, allowing for easy integration with web applications
  • Extensive time-travel debugging capabilities
  • Supports multiple instances for complex applications

Cons of Redux DevTools Extension

  • Limited to Redux state management
  • Requires browser extension installation for full functionality
  • May have performance impact on large-scale applications

Code Comparison

Redux DevTools Extension:

import { createStore, applyMiddleware, compose } from 'redux';

const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
const store = createStore(rootReducer, composeEnhancers(applyMiddleware(...middleware)));

Reactotron:

import Reactotron from 'reactotron-react-native';
import { reactotronRedux } from 'reactotron-redux';

Reactotron.configure()
  .useReactNative()
  .use(reactotronRedux())
  .connect();

Reactotron offers a more versatile debugging solution for React and React Native applications, supporting various state management libraries and providing a standalone desktop application. It includes features like API monitoring, custom commands, and benchmarking. However, it requires additional setup and may have a steeper learning curve compared to the Redux DevTools Extension.

Redux DevTools Extension is more focused on Redux state management and offers a seamless browser integration, making it easier to use for web developers already familiar with browser developer tools. It excels in time-travel debugging but may be limited in scope compared to Reactotron's broader feature set.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Reactotron Logo

Join our Community Slack

Introduction

Reactotron is a powerful debugger for React and React Native applications. It provides an easy-to-use interface for developers to monitor their application's state, network requests, and performance metrics and can be used for any size of project, from small personal apps to large-scale enterprise applications. The OG debugger at Infinite Red that we use on a day-to-day basis to build client apps. Additionally, Reactotron is completely open source and free to use, making it an invaluable tool for developers at all levels of experience.

We recommend that you watch Darin Wilson's talk at Chain React: Chain React 2018: Debugging and Beyond with Reactotron!

Reactotron Superpowers

Use Reactotron to:

  • view your application state
  • show API requests & responses
  • perform quick performance benchmarks
  • subscribe to parts of your application state
  • display messages similar to console.log
  • track global errors with source-mapped stack traces including saga stack traces!
  • dispatch actions like a government-run mind control experiment
  • hot swap your app's state using Redux or mobx-state-tree
  • show image overlay in React Native
  • track your Async Storage in React Native

You plug it into your app as a dev dependency so it adds nothing to your production builds.

Desktop

Reactotron on the left, demo React Native app on the right.

Desktop

Installation

On the Releases page, you can find the latest version of:

  • macOS (x64 & arm64)
  • Linux (32-bit & 64-bit)
  • Windows (32-bit & 64-bit)

How to setup Reactotron in our app

How to use Reactotron's features/plugins

Tips and Tricks

Some tips that will elevate your Reactotron experience.

Bug Reports

When reporting problems with Reactotron, use the provided example app located in app/example-app to replicate the issue. This approach enables us to isolate and expedite the resolution of the problem.

Want to contribute? Here are some helpful reading materials

Troubleshooting

Credits

Reactotron is developed by Infinite Red, @rmevans9, and 70+ amazing contributors! Special thanks to @skellock for originally creating Reactotron while at Infinite Red.

Premium Support

Reactotron, as an open source project, is free to use and always will be. Infinite Red offers premium React and React Native mobile app design/development services. Email us at hello@infinite.red to get in touch for more details.

NPM DownloadsLast 30 Days