Skip to content
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

Closed
wants to merge 8 commits into from
Closed

Conversation

alvinthen
Copy link
Contributor

Further describe the methods available on NetInfo.

Question: How do I update the docs on the website?

@ghost
Copy link

ghost commented May 4, 2016

By analyzing the blame information on this pull request, we identified @bestander and @satya164 to be potential reviewers.

@ghost ghost added GH Review: review-needed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels May 4, 2016
@ghost
Copy link

ghost commented May 4, 2016

@alvinthen updated the pull request.

@janicduplessis
Copy link
Contributor

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

cd website
npm install
npm start

@@ -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.
Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor

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.

Copy link
Contributor

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.

@alvinthen
Copy link
Contributor Author

I have updated as per requested. I moved the documentation of the methods of isConnected to the object itself, this can help developer to understand without going through the source code

@ghost
Copy link

ghost commented May 4, 2016

@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.
Copy link
Contributor

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 ...

@janicduplessis
Copy link
Contributor

Can you just do those small wording changes then this is good to go, thanks!

@ghost
Copy link

ghost commented May 13, 2016

@alvinthen updated the pull request.

@janicduplessis
Copy link
Contributor

@facebook-github-bot shipit

@ghost ghost added GH Review: accepted Import Started This pull request has been imported. This does not imply the PR has been approved. and removed GH Review: review-needed labels May 15, 2016
@facebook-github-bot
Copy link
Contributor

Thanks for importing. If you are an FB employee go to Phabricator to review.

@ghost ghost closed this in 433c0e8 May 15, 2016
zebulgar pushed a commit to nightingale/react-native that referenced this pull request Jun 18, 2016
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
samerce pushed a commit to iodine/react-native that referenced this pull request Aug 23, 2016
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
mpretty-cyro pushed a commit to HomePass/react-native that referenced this pull request Aug 25, 2016
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
matt-oakes pushed a commit to matt-oakes/react-native that referenced this pull request Feb 7, 2019
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
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Import Started This pull request has been imported. This does not imply the PR has been approved.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants