Skip to content
This repository has been archived by the owner on Mar 9, 2021. It is now read-only.

adds image overlay feature from Reactotron #20

Merged
merged 1 commit into from
Apr 17, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions boilerplate/App/Config/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
### Config Folder
All application specific configuration falls in this folder.

`DebugConfig.js` is used for development-wide globals.
`ReactotronConfig.js` is used for Reactotron client settings.
`AppConfig.js` - production values.
`DebugConfig.js` - development-wide globals.
`ReactotronConfig.js` - Reactotron client settings.
`ReduxPersist.js` - rehydrate Redux state.
14 changes: 8 additions & 6 deletions boilerplate/App/Config/ReactotronConfig.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { StartupTypes } from '../Redux/StartupRedux'
import Config from '../Config/DebugConfig'
import Immutable from 'seamless-immutable'
const Reactotron = require('reactotron-react-native').default
const errorPlugin = require('reactotron-react-native').trackGlobalErrors
const apisaucePlugin = require('reactotron-apisauce')
const { reactotronRedux } = require('reactotron-redux')
const sagaPlugin = require('reactotron-redux-saga')
import Reactotron, { overlay, trackGlobalErrors } from 'reactotron-react-native'
import apisaucePlugin from 'reactotron-apisauce'
import { reactotronRedux } from 'reactotron-redux'
import sagaPlugin from 'reactotron-redux-saga'

if (Config.useReactotron) {
Reactotron
Expand All @@ -15,7 +14,7 @@ if (Config.useReactotron) {
})

// forward all errors to Reactotron
.use(errorPlugin({
.use(trackGlobalErrors({
// ignore all error frames from react-native (for example)
veto: (frame) =>
frame.fileName.indexOf('/node_modules/react-native/') >= 0
Expand All @@ -24,6 +23,9 @@ if (Config.useReactotron) {
// register apisauce so we can install a monitor later
.use(apisaucePlugin())

// add overlay ability for graphics
.use(overlay())

// setup the redux integration with Reactotron
.use(reactotronRedux({
// you can flag some of your actions as important by returning true here
Expand Down
5 changes: 4 additions & 1 deletion boilerplate/App/Containers/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,7 @@ class App extends Component {
}
}

export default App
// allow reactotron overlay for fast design
const AppWithBenefits = console.tron.overlay(App)

export default AppWithBenefits