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

sql - invalid in the select list because it is not contained in either an aggregate function -

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

How to start daemon on android by adb -