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
[Errors] Improve the error message shown when an unregistered callback is invoked #6300
Comments
Is this issue still open? I see that the referenced issue is closed. |
@agiron123 Hi, this issue is still open and thanks for offering to help. To answer your question, I would say the main thing to keep in mind is balancing the cost of maintaining the code with how valuable a feature is to everyone using React Native. For this issue specifically, I don't think that will be an issue -- a clearer error message in this case should be simple and strictly better than what we currently have. |
Fix for issue facebook#6300. This fix adds a more descriptive error message for the error case when more than one callback is registered to a native function.
Summary:Fix for issue #6300: Motivation: When more than one callback is registered to a native module, the error message that a user receives is not indicative of what is really happening. Closes #6436 Differential Revision: D3087551 Pulled By: tadeuzagallo fb-gh-sync-id: 93c703348dc53b75c5b507edc71754680ab5c438 shipit-source-id: 93c703348dc53b75c5b507edc71754680ab5c438
Should this issue be closed since the PR was merged into master? fd2cf11 |
…acks. Summary:Fix for issue facebook#6300: Motivation: When more than one callback is registered to a native module, the error message that a user receives is not indicative of what is really happening. Closes facebook#6436 Differential Revision: D3087551 Pulled By: tadeuzagallo fb-gh-sync-id: 93c703348dc53b75c5b507edc71754680ab5c438 shipit-source-id: 93c703348dc53b75c5b507edc71754680ab5c438
See #6286. RN expects exactly one callback to be called exactly once, after which point it unregisters the callbacks to free memory. We should print a nicer error message when an unregistered callback is invoked.
The text was updated successfully, but these errors were encountered: