Enable React Devtools - #554
Conversation
katinthehatsite
left a comment
There was a problem hiding this comment.
The changes worked as expected to me. I was able to see the React tools activated.
One small note on the testing instructions is that I had to do Force Reload instead of just Reload to make it work.
I remember that some time ago, we also introduced standalone React dev tools in https://github.com/Automattic/local-environment/pull/148 - do we need both?
Ah, in my case just reloading worked but it might depend on the state of the app. I'll update the testing instructions, thanks!
Oh, I overlooked this documentation when I tried to use the React Devtools. I think we can have both as they provide two different ways to access React Devtools:
Ideally, the latter could supersede the former if we find a workaround to avoid reloading the window to make the React Devtools visible. In any case, I'm ok if we rather keep one option and discard this approach 🙂. |
|
Personally, I prefer approach in this PR to the one in: https://github.com/Automattic/local-environment/pull/148 because that one requires you to start extra things while this approach is more straightforward 👍 I also do not mind reloading the window and I think it is okay for now as long as we mention it explicitly in the documentation. That is to say that I think we definitely should keep this approach. As for the standalone tools, we can either keep them or remove them - I do not have a strong preference. I do not use is very often and with this new approach will likely use them even less often. |
Good point. I'll update the documentation in a separate PR to mention this.
Sounds good. I also don't have a strong preference for either keeping it or removing it. Since both can live together, I'd lean toward keeping both for now. |
Proposed Changes
Note
The React Devtools don't show up when starting the app due to a known bug (MarshallOfSound/electron-devtools-installer#244). They appear when making a change in the code (i.e. when hot-reloading is triggered) or by reloading manually the window.
Testing Instructions
npm start.Command-Ror menu itemView->Reload.Pre-merge Checklist