2022-10-17 11:11:23 +03:00
import AsyncStorage from '@react-native-async-storage/async-storage' ;
import Reactotron from 'reactotron-react-native' ;
import { reactotronRedux } from 'reactotron-redux' ;
2022-11-18 10:55:23 +03:00
import ReactotronFlipper from 'reactotron-react-native/dist/flipper' ;
2021-05-18 08:26:29 +03:00
2022-10-17 11:11:23 +03:00
const reactotron = Reactotron . setAsyncStorageHandler ( AsyncStorage ) // AsyncStorage would either come from `react-native` or `@react-native-community/async-storage` depending on where you get it from
2021-05-18 08:26:29 +03:00
. configure ( {
2022-10-17 11:11:23 +03:00
name : 'Ecency' ,
2022-12-20 16:46:53 +03:00
// For flipper reactotron client connecting with app issue check this
// https://github.com/infinitered/flipper-plugin-reactotron/issues/63#issuecomment-1318354958
createSocket : ( path ) = > new ReactotronFlipper ( path ) ,
2021-05-18 08:26:29 +03:00
} )
. useReactNative ( ) // add all built-in react native plugins
. use ( reactotronRedux ( ) )
2022-10-17 11:11:23 +03:00
. connect ( ) ; // let's connect!
2021-05-18 08:26:29 +03:00
2022-10-17 11:11:23 +03:00
export default reactotron ;
2023-09-26 20:39:43 +03:00
export const log = ( . . . rest ) = > {
Reactotron . log ( . . . rest ) ;
console . log ( . . . rest ) ;
} ;