react-native-ble-plx icon indicating copy to clipboard operation
react-native-ble-plx copied to clipboard

Implement onCatalystInstanceDestroy() to better refresh experience

Open sdandois opened this issue 4 years ago • 0 comments

Current Behavior

When I refresh the javascript code (RR in Android), the native module state becomes inconsistent. I need to close the app and reopen to device connections to close.

New behavior

All devices are disconnected on refresh.

Acceptance criteria

I've seen here that you could implement the method onCatalystInstanceDestroy with a logic that disconnects the devices and resets the state of module to accomplish this.

Here is an example

Breaking changes

Don't think so.

PD: Thanks for such an awesome library.

sdandois avatar Jun 15 '21 17:06 sdandois