https://github.com/tanhauhau/reactotron-react
Universal Reactotron for React Native and React
https://github.com/tanhauhau/reactotron-react
react react-native react-primitives reactotron
Last synced: 3 months ago
JSON representation
Universal Reactotron for React Native and React
- Host: GitHub
- URL: https://github.com/tanhauhau/reactotron-react
- Owner: tanhauhau
- Created: 2017-07-26T14:28:07.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-07-26T15:40:07.000Z (almost 8 years ago)
- Last Synced: 2025-03-08T09:35:30.729Z (4 months ago)
- Topics: react, react-native, react-primitives, reactotron
- Language: JavaScript
- Size: 600 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# reactotron-react
### Universal [Reactotron](https://github.com/infinitered/reactotron) import for [react-native](https://github.com/infinitered/reactotron/blob/master/docs/quick-start-react-native.md) and [react-js](https://github.com/infinitered/reactotron/blob/master/docs/quick-start-react-js.md)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
```bash
npm install --save-dev reactotron-react
# or yarn
yarn add reactotron-react
```## Usage
```js
// 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
* To know more about Reactotron, see [here](https://github.com/infinitered/reactotron)
* To install Reactotron, see [Installation guide](https://github.com/infinitered/reactotron/blob/master/docs/installing.md)## Recommend
Watch this amazing talk leland richardson about writing universal react app for Android, iOS, web and more platforms.[](https://www.youtube.com/watch?v=JaRtmgaNZos)