Memor 10 with react native

Hello i have a react native project. I would like to use the ReactNative SDK, i follow the document how can i use the BarcodeManager. In my app i have two screen to scan a barcode, when i move from one to another screen and scan the same barcode for some reason the buffer does not clear i suppose.
If i scan all the time in the same screen and not move from to one to another screen it works normaly.
Do you have any idea why this happens?
Thanks
Nikolaos

Hi Nikolaos,

I don’t exactly understand the question unfortunately. Can you elaborate on this part of your description?

the buffer does not clear i suppose.

Perhaps this line in the API documentation is relevant:

Therefore, you will typically only need to call barcodeManager.addReadListener() once in your application.

Thank you,
Cody

Hello Cody,
Yes i put on App.js like this
async componentDidMount() {

await BarcodeManager.addReadListener();






setTimeout(function () { SplashScreen.hide() }, 1000);



AsyncStorage.getItem(userDefaultsKey.language).then(value => {

  console.log('Apppp Jsssss',value)

  if (value !== null && value === "el") {

    this.settext('el')

  }

  else {

    this.settext('en')

  }

  const resetAction = StackActions.reset({

    index: 0,

    actions: [NavigationActions.navigate({ routeName: 'SplashScreen' })],

  });

  this.props.navigation.dispatch(resetAction);

})

}

And on two screens i use this:
async componentDidMount() {

    this.props.navigation.addListener('willFocus', this.load)


             


    const eventEmitter = new NativeEventEmitter(BarcodeManager);

    eventEmitter.addListener('successCallback', (map) => {

     console.log('Barcode Result', map.barcodeData);

        this.onBarcodeScan(map.barcodeData); //this i call to search the barcode

  });



}

Is this ok or i have to make changes.
Thanks in advance.
Best regards,
Nikolaos

Hello Cody,
Do you see my issue?
Thanks in advance.
Best regards,
Nikolaos Rakovolios