-
-
Notifications
You must be signed in to change notification settings - Fork 651
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
docs: add react-devtools information #3801
Conversation
@gnprice please review. |
docs/howto/debugging.md
Outdated
|
||
## React Devtools | ||
|
||
The standalone version of React DevTools, which is an electron app, can be used to inspect the react-native components of the app. Since the version of react-native we use is `0.59`, the latest version (v4) of react-devtools is not supported, and v3 needs to be installed. This can be done using the command `npm i -g react-devtools@^3` See [this blog post](https://reactjs.org/blog/2019/08/15/new-react-devtools.html#which-versions-of-react-are-supported) for complete compability information. Refer to [it's npm page](https://www.npmjs.com/package/react-devtools) for instructions on how to use with React Native. |
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.
react-native 0.61.5
is the current version, and so 0.62 (the supported version) should be released soon. The wording of this doc makes it future-proof.
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.
Thanks @agrawal-d ! Good to know about this gotcha -- and this is a section we should definitely have in this doc. I was surprised to see that we don't already. 🙂
This text is pretty good. Some comments on specifics below, as well as a couple of important general tips about writing documentation (handling things that will change, and organizing into paragraphs.)
docs/howto/debugging.md
Outdated
|
||
## React Devtools | ||
|
||
The standalone version of React DevTools, which is an electron app, can be used to inspect the react-native components of the app. Since the version of react-native we use is `0.59`, the latest version (v4) of react-devtools is not supported, and v3 needs to be installed. This can be done using the command `npm i -g react-devtools@^3` See [this blog post](https://reactjs.org/blog/2019/08/15/new-react-devtools.html#which-versions-of-react-are-supported) for complete compability information. Refer to [it's npm page](https://www.npmjs.com/package/react-devtools) for instructions on how to use with React Native. |
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.
Style nit: for Markdown links, please pull the URLs out-of-line (except for very short relative URLs). See for example the chrome-devtools-device
link above, and similar links throughout this file.
This makes the Markdown source easier to read and edit.
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.
Bump -- this is still needed.
docs/howto/debugging.md
Outdated
|
||
## React Devtools | ||
|
||
The standalone version of React DevTools, which is an electron app, can be used to inspect the react-native components of the app. Since the version of react-native we use is `0.59`, the latest version (v4) of react-devtools is not supported, and v3 needs to be installed. This can be done using the command `npm i -g react-devtools@^3` See [this blog post](https://reactjs.org/blog/2019/08/15/new-react-devtools.html#which-versions-of-react-are-supported) for complete compability information. Refer to [it's npm page](https://www.npmjs.com/package/react-devtools) for instructions on how to use with React Native. |
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.
As discussed in chat, this isn't really about the version of RN we use. Rather, it's that v4 does not support any released version of React Native, as of 2020-01.
This also touches on a useful tactic for writing docs: where possible, avoid writing specifics which will change over time, like "we use RN v0.59". When we upgrade, that either becomes one more thing we need to update, or it becomes wrong and potentially misleading. (And we'll have two upgrades before the v0.62 upgrade that lets us delete this bit of docs entirely.) Instead, say things that stay true. When that's tricky, you can always add "as of today's month" so readers in the future know when the statement was true.
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.
As of today's month, we do not support the latest version (v4) of
react-devtools, and v3 needs to be installed.
Hmm, I guess this point wasn't clear. This sentence is still something that will change over time, and stop being true. What I meant was to write down the actual month that you're writing the text in, like I did in the description above: "as of 2020-01".
But again, this really isn't about what we do or don't support. Rather it's that react-devtools v4 does not support any released version of React Native, quite beyond our control. So that's the thing we should say.
Thanks for the detailed review, @gnprice! It would have taken you much less time to make the changes yourself, so I really appreciate it - the reviews from the Zulip developer community are very educational! :D |
@gnprice can you please have a look at this? Thanks! |
4b8ed11
to
fc96a38
Compare
docs/howto/debugging.md
Outdated
|
||
The standalone version of React DevTools, which is an electron app, can be used | ||
to debug the react-native component hierarchy. Refer to | ||
[the docs](https://facebook.github.io/react-native/docs/debugging.html#react-sdeveloper-tools) |
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.
An important step when writing documentation with links in it: test out the links to make sure you don't have a typo in them 😉
Thanks for the revisions! See the comment just above, and also replies further up in the thread -- GitHub can make those easy to miss. |
Thanks for the review, @gnprice. Have pushed some changes. |
Currently, there is no information about react-devtools in the debugging documentation. Add section for react-devtools. Add compatibility information for the same.
Adjust the descriptions of the external pages we link to, as well as small bits of capitalization and wording.
Merged -- thanks @agrawal-d ! I added a commit on top with some small edits; take a look. |
Adds information about
react-devtools
.