-
-
Notifications
You must be signed in to change notification settings - Fork 744
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
Improve Events (or update Docs) #849
Labels
Comments
Hi, I made the example like the official doc, why are you suggesting to do it in another way? |
Hi Marco,
I am suggesting to do it another way because the official doc example is a use-case where you can choose if you want the eventemitter or not. This choice works well for use-cases where the eventemitter is not required for the module to function in a useful way.
The react-native-ble-manager module relies directly on the events, and would not work without them. As it currently is, the module forces every user to repeat the code from the example in the docs in order to use the module.
Therefore, my suggestion is to streamline the user experience by incorporating the example from the docs “under the hood” within the module. This way, users don’t need to repeat it, and can simply listen for events on the module itself.
Please let me know your thoughts?
Best,
-Joe
… On Jul 25, 2022, at 6:04 AM, Marco Sinigaglia ***@***.***> wrote:
Hi, I made the example like the official doc, why are you suggesting to do it in another way?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Events should be listenable directly on the BleManager instance. The docs show something like
This should be included out-of-the-box by adding the above 'import' statement as well as the following class-edits to BleManage.js:
The text was updated successfully, but these errors were encountered: