reactjs - Execute async task in componentWillUnmount in React Native? -


i trying disconnect bluetooth device before unmounting component in react native. disconnect done asynchronously. following approach not disconnecting device. how can make work?

i guess has fact disconnect done async.

componentwillunmount(){    bluetoothmanager.disconnect(device); // working in other contexts. } 


Comments

Popular posts from this blog

How to start daemon on android by adb -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

testing - Detect whether test has failed within fixture -