-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BREAKING CHANGE: Use promises instead of callbacks #56
BREAKING CHANGE: Use promises instead of callbacks #56
Conversation
LGTM. However, this will be a breaking change. Should we add both options for backwards compatibility or we release the 4.0.0? |
Maybe tag this and wait until we have a few more breaking changes? Supporting both would be a pain in the ass? |
There are 3 or 4 more callbacks that I would like to replace with promises . |
We can turn this PR in an overall library promisification. |
Yep, I think the same. this MR not would be a Breaking Change, but I like promisification |
Entirely removing the callbacks might break older code (mine included) as it is not backwards compatible. A promisfication is tipically a breaking change. |
I think it makes sense to do this, at the moment sometimes for iOS it's via promise, android via callback. That doesn't make sense? Did not yet find the time to do this though. |
Me too |
…se-promises # Conflicts: # lib/types/index.d.ts
I'm in the process of changing all used callbacks to promises on Android. Is there still work on this for iOS? |
…y connected WiFi network
I think I am done. |
@eliaslecomte, did you test these changes on iOS? |
No, I think all of them were android only. Could you do testing on iOS? I only bave the iOS enlmulator atm. |
android/src/main/java/com/reactlibrary/rnwifi/RNWifiModule.java
Outdated
Show resolved
Hide resolved
android/src/main/java/com/reactlibrary/rnwifi/RNWifiModule.java
Outdated
Show resolved
Hide resolved
@eliaslecomte, I will test it on iOS ASAP. |
@eliaslecomte, I have tested the example App on iOS with this branch and everything looks fine. |
… network configuration and returns true when it didn't find the wifi config
This is ready to be merged 👍. |
LGTM! |
# [4.0.0](v3.1.2...v4.0.0) (2020-05-01) * Merge pull request #56 from inthepocket/feature/android-use-promises ([83e30cd](83e30cd)), closes [#56](#56) ### Features * **promise:** change isEnabled from callback to promise. ([5631fe8](5631fe8)) * **promise:** return the current signal strength as a promise ([7ef9a40](7ef9a40)) * **promise:** use a promise instead of callsbacks for isRemoveWifiNetwork ([abb3be2](abb3be2)) * **promise:** use a promise to resolve the frequency of the currently connected WiFi network ([79dc3bf](79dc3bf)) * **promise:** use a promise to return results for reScanAndLoadWifiList() ([dcdeb0c](dcdeb0c)) * **promise:** use a promise to return the bssid of the currenlty connected network ([8d39c67](8d39c67)) * **promise:** use a promise to return the loadWifiList results ([e0fe2b9](e0fe2b9)) ### BREAKING CHANGES * Use promises instead of callbacks
🎉 This PR is included in version 4.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Use a promise instead of the callback mechanism. Readme + typescript definition also updated.