Skip to content

Instantly share code, notes, and snippets.

@ozluy
Created April 9, 2020 20:37
Show Gist options
  • Save ozluy/5561d39b366d616555523a8202286c68 to your computer and use it in GitHub Desktop.
Save ozluy/5561d39b366d616555523a8202286c68 to your computer and use it in GitHub Desktop.
Rematch Reactotron setup for React Native
import Reactotron from 'reactotron-react-native'
import { reactotronRedux } from 'reactotron-redux'
import { AsyncStorage } from 'react-native'
const tron = Reactotron.configure() // AsyncStorage would either come from `react-native` or `@react-native-community/async-storage` depending on where you get it from // controls connection & communication settings
.useReactNative() // add all built-in react native plugins
.use(reactotronRedux()) // add all built-in react native plugins
.setAsyncStorageHandler(AsyncStorage)
.connect() // let's connect!
export default tron
import { init } from '@rematch/core'
import * as models from './models'
import config from 'common/config'
import Reactotron from '../../ReactotronConfig'
const store = init({
models,
redux: {
enhancers: [Reactotron.createEnhancer()],
devtoolOptions: {
disabled: config.environment !== 'development',
},
},
})
export const dispatch = store.dispatch
export default store
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment