reactotron icon indicating copy to clipboard operation
reactotron copied to clipboard

problem with async Storage multiple connections after reload

Open duilio92 opened this issue 4 years ago • 4 comments

Whenever I re load my app a new connection is created (as if it were a different device).

Here is my Reactotron initial configuration:

import {AsyncStorage} from '@react-native-async-storage/async-storage';
import Config from './Config/DebugConfig';

if (Config.useReactotron){
    Reactotron
        .setAsyncStorageHandler(AsyncStorage) // AsyncStorage would either come from `react-native` or `@react-native-community/async-storage` depending on where you get it from
        .configure() // controls connection & communication settings
        .useReactNative() // add all built-in react native plugins
        .connect() // let's connect!

I can't figure out what is wrong

duilio92 avatar Dec 13 '20 13:12 duilio92

did you figure this out? Its started happening to me.

juddey avatar Mar 26 '21 01:03 juddey

Use it like this will create only one connection:

import AsyncStorage from '@react-native-async-storage/async-storage';

Reactotron.configure({ name: 'app_name' }) .setAsyncStorageHandler(AsyncStorage) .useReactNative() .use(sagaPlugin()) .use(reactotronRedux()) // <- here i am! .connect();

Ajmal0197 avatar Sep 24 '21 08:09 Ajmal0197

@Ajmal0197 you are right! I resolved this issue with .setAsyncStorageHandler(AsyncStorage)

cuantmac avatar May 31 '22 08:05 cuantmac