-
Notifications
You must be signed in to change notification settings - Fork 24k
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
Add comments on NetInfo.js #7375
Conversation
By analyzing the blame information on this pull request, we identified @bestander and @satya164 to be potential reviewers. |
@alvinthen updated the pull request. |
The docs on the website are generated from the code so the comments you added should show up on the website. You can test it locally with
|
@@ -168,6 +168,9 @@ const _isConnectedSubscriptions = new Map(); | |||
* ``` | |||
*/ | |||
const NetInfo = { | |||
/* | |||
* Invokes the handler whenever the network info changes. The handler is passed with any of the connectivity types listed above. |
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.
Wrap the comments at around 80 characters.
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.
@janicduplessis from the contributing guide, it says
Do not wrap lines at 80 characters - configure your editor to soft-wrap when editing documentation.
Did I understand incorrectly?
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.
Can you change it to Invokes the listener whenever network status changes. The listener receives one of the connectivity types listed above.
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.
This is for markdown files in the docs section. We wrap doc blocks at ~80 for js files.
I have updated as per requested. I moved the documentation of the methods of |
@alvinthen updated the pull request. |
@@ -196,10 +203,19 @@ const NetInfo = { | |||
_subscriptions.delete(handler); | |||
}, | |||
|
|||
/** | |||
* Returns a promise that returns one of the connectivity types listed above. |
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.
Let's change this to Returns a promise that resolves with one ...
Can you just do those small wording changes then this is good to go, thanks! |
@alvinthen updated the pull request. |
@facebook-github-bot shipit |
Thanks for importing. If you are an FB employee go to Phabricator to review. |
433c0e8
Summary: Further describe the methods available on NetInfo. Question: How do I update the docs on the website? Closes facebook#7375 Differential Revision: D3303300 fbshipit-source-id: 4343d490f65e4e47b93f2c98a645cb675d2cf708
Summary: Further describe the methods available on NetInfo. Question: How do I update the docs on the website? Closes facebook#7375 Differential Revision: D3303300 fbshipit-source-id: 4343d490f65e4e47b93f2c98a645cb675d2cf708
Summary: Further describe the methods available on NetInfo. Question: How do I update the docs on the website? Closes facebook#7375 Differential Revision: D3303300 fbshipit-source-id: 4343d490f65e4e47b93f2c98a645cb675d2cf708
Summary: Further describe the methods available on NetInfo. Question: How do I update the docs on the website? Closes facebook#7375 Differential Revision: D3303300 fbshipit-source-id: 4343d490f65e4e47b93f2c98a645cb675d2cf708
Further describe the methods available on NetInfo.
Question: How do I update the docs on the website?