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

docs: add react-devtools information #3801

Merged
merged 2 commits into from
Jan 27, 2020
Merged

docs: add react-devtools information #3801

merged 2 commits into from
Jan 27, 2020

Conversation

agrawal-d
Copy link
Member

Adds information about react-devtools.

@agrawal-d
Copy link
Member Author

@gnprice please review.


## 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.
Copy link
Member Author

@agrawal-d agrawal-d Jan 14, 2020

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.

Copy link
Member

@gnprice gnprice left a 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 Show resolved Hide resolved

## 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.
Copy link
Member

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.

Copy link
Member

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.


## 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.
Copy link
Member

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.

Copy link
Member

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.

docs/howto/debugging.md Outdated Show resolved Hide resolved
docs/howto/debugging.md Outdated Show resolved Hide resolved
@agrawal-d
Copy link
Member Author

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

@agrawal-d
Copy link
Member Author

@gnprice can you please have a look at this? Thanks!


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)
Copy link
Member

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 😉

@gnprice
Copy link
Member

gnprice commented Jan 24, 2020

Thanks for the revisions!

See the comment just above, and also replies further up in the thread -- GitHub can make those easy to miss.

@agrawal-d
Copy link
Member Author

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.
@gnprice gnprice merged commit 7afe4c0 into zulip:master Jan 27, 2020
@gnprice
Copy link
Member

gnprice commented Jan 27, 2020

Merged -- thanks @agrawal-d ! I added a commit on top with some small edits; take a look.

@gnprice gnprice mentioned this pull request Jan 27, 2020
@agrawal-d agrawal-d deleted the docs branch January 28, 2020 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants