-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[ios][android] support return value for native module APIs someway #968
Comments
It's a very very bad idea: |
Maybe we can refer to the design of JSON-RPC. |
If this issue is solved, then the timer api module will be valid to use again.
even though the timer can be set and clear by calling And maybe there occurs another using case in another day. I think the ability should be prepared to solve such problems. |
The more valuable thing of this is we provide module developers the ability of both mechanism for sync & async pattern. Neither keep all module APIs async nor switch all module APIs into sync mode. The module developers could make the choice on their own. Take storage module for example, this is a very simple k-v pairs data storage, not necessary to implemented by a SQLite database and async/callback APIs. This could be more easily to implement and use. Thanks. |
This discussion is moved to #1677 |
For example
getItem(key)
in storage module. It's more simple and familiar with web developers.Of course from the perf aspect, this kind of API is suitable for non-frequent calls only.
The text was updated successfully, but these errors were encountered: