React Native - Module Lifecycle - Dispose resources on "Reload"
<p>I am using a react native module (<a href="https://github.com/rusel1989/react-native-bluetooth-serial" rel="noreferrer">https://github.com/rusel1989/react-native-bluetooth-serial</a>) for Bluetooth communication with an Arduino.</p>

<p>Eveything works just fine. But when I press "Reload" or the application reloads due to Live Reload being enabled, the <code>onDestroy</code> method of the module is not called. Because of that, the sockets (and streams) are no correctly disposed. </p>

<p>When the reload is finished, I can no longer open a bluetooth socket. It requires me to disable and enable bluetooth, or to restart the application.</p>

<p>Is there ant callback or method I could implement that would correctly dispose these sockets when I reload my application?</p>