-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Remove unused failureCallback in example #2650
Conversation
Hi @Atrox! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
✔️ Deploy Preview for react-native ready! 🔨 Explore the source changes: 4d94de6 🔍 Inspect the deploy log: https://app.netlify.com/sites/react-native/deploys/60d3824fc1e01e000852df60 😎 Browse the preview: https://deploy-preview-2650--react-native.netlify.app |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Atrox, this example is a part of bigger section and shows an alternative approach to handling callbacks, as the paragraph above says:
There are two approaches to error handling with callbacks. The first is to follow Node’s convention and treat the first argument passed to the callback as an error object.
The example located above this one uses the single argument for callback.
Oh, I see, you have edited the wrong file. In the There might be also some changes in corresponding paragraphs which also need to be back-ported. If you don't want to work on this changes please close this PR and I will look into this in soon. 🙂 |
To be honest the arrangement of examples in this section isn't that great and it's a bit confusing. There are some parts which can be definitely simplified. You are right that also in Thank you for your patience and catching this up! So the change in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you for the update! 🚀
This is removing the unused and confusing failure callback in the example code. The text above the example is talking about the node callback convention with a single callback for success and error.