Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

README.md

reactotron-react

Universal Reactotron import for react-native and react-js

If you are writing universal app for both web and native, and wonder whether to import reactotron-react-native or reactotron-react-js, import reactotron-react then. Under the hood, reactotron-react uses module import and file extensions to selectively import reactotron-react-native or reactotron-react-js based on the platform you are running on.

Getting started

npm install --save-dev reactotron-react
# or yarn
yarn add reactotron-react

Usage

// instead of
import Reactotron from 'reactotron-react-js'

Reactotron
  .configure() // we can use plugins here -- more on this later
  .connect() // let's connect!

// or

import Reactotron from 'reactotron-react-native'

Reactotron
  .configure() // controls connection & communication settings
  .useReactNative() // add all built-in react native plugins
  .connect() // let's connect!

// do

import Reactotron from 'reactotron-react'
Reactotron
  .configure()
  .useReactNative() // this will have no effect on react-js for web
  .connect()

Read more

Recommend

Watch this amazing talk leland richardson about writing universal react app for Android, iOS, web and more platforms.

thumbnail

About

Universal Reactotron for React Native and React

Topics

Resources

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.