r/javascript • • Aug 16 '19

Introducing the New React DevTools

https://reactjs.org/blog/2019/08/15/new-react-devtools.html
181 Upvotes

37 comments sorted by

7

u/98ea6e4f216f2fb Aug 16 '19

What can we do to force install it now? Npm global does nothing.

21

u/acemarke Aug 16 '19

It's a browser extension, so it's available from the Chrome and Firefox addon stores:

React DevTools for Chrome

React DevTools for Firefox

4

u/swamso Aug 16 '19

Ya know that dev tools are a part of your browser? It has nothing to do do with npm / node. Only for development.

-2

u/98ea6e4f216f2fb Aug 16 '19

Yes of course. The point is that the official React blog is instructing people to install with npm.

6

u/acemarke Aug 16 '19

It says that's "only if you're using the standalone shell with React Native".

1

u/swamso Aug 16 '19

Oh sorry, didn't saw that.

8

u/STAY_ROYAL Aug 16 '19

It’ll update automatically if you already have it in your browser.

1

u/alphex Aug 16 '19

back in my day you downloaded a zip or tar ball and didn’t have to wait for anyone else...

10

u/[deleted] Aug 16 '19

Nice. Thanks for the update.

1

u/a-t-k Frontend Engineer Aug 16 '19

The update is really nice in terms of basic look and feel. However, the feature to put a prop into a global variable by clicking a context menu is now missing - and I found it very useful in some cases.

5

u/acemarke Aug 16 '19

Per the blog post, file an issue and they might be able to do something about that. (you could maybe even try adding it yourself and file a PR.)

2

u/a-t-k Frontend Engineer Aug 16 '19

Will do. If I find the time, I might even open the PR.

4

u/TheOtherGallery Aug 16 '19

This update is just 🔥. It makes developing and debugging components so much easier. I can't even choose a favorite feature. Thank you to everyone that worked on this.

1

u/almofin Aug 20 '19

The UI on the left is pretty ugly and I preferred when I could see more information about the DOM on the left side too

1

u/[deleted] Aug 16 '19

Man they really did rip off Vue's devtools and it was a brilliant idea.

0

u/Artur96 Aug 16 '19

Finally Hooks support ♥️

-23

u/Cokrates Aug 16 '19

Yeah I'm gonna pass, not down for allowing an extension to access my browsing history. Good old facebook trying to shoehorn in some data collection on the developers using their tools.

23

u/acemarke Aug 16 '19

Uh... what? No.

The 4.0 release did apparently request more permissions than it needed, but that's been fixed and republished . Explanation :

https://www.reddit.com/r/reactjs/comments/cqx554/introducing_the_new_react_devtools/ex0lygi/

6

u/aniforprez Aug 16 '19

Yeah I was about to ask why it needed browser permissions. Was sure it had nothing to do with Facebook's data collection but was still wary. I'm glad to see it was patched out

4

u/Cokrates Aug 16 '19 edited Aug 16 '19

So I get down-voted to hell because I said their extension requested access to browsing history, and it did. Good for them to patch it out, but at the time they had not.

What can I say, sorry for assuming one of the biggest perpetrators of improper data collection on users was attempting to exploit developers using their tools for, well, data collection. If something requests access to my browsing history I don't assume they have my best interest at heart. And that type of thing doesn't happen accidentally, someone had to write in those permission requests.

2

u/Cokrates Aug 16 '19

So just to be clear, your comment starts with 'Uh..what? No.' but then you immediately say they had the issue I wrote about but patched it? I don't understand what you think you're saying no to but it isn't the statement I made, because they did exactly what I said they did. And unlike others I don't automatically assume papa facebook has my best interests at heart when they have a clear history of data mismanagement, and ask for access to my browsing history. Someone had to write in the requests for those permissions so no matter how innocuous the reason was, that release had what I said it did.

2

u/acemarke Aug 16 '19

Yes, those permissions were asked for originally, but you were claiming that it was a bunch of malicious data collection when that clearly wasn't that case here, as you can see in the diffs and explanations linked in the other comment thread.

3

u/hopfield Aug 16 '19

It’s open source dude

7

u/alexcroox Aug 16 '19

While I trust the dev team in this example, it should be noted that Chrome browser extensions are not open source. I have made several and while each has its own git repo, what I upload in the zip to Chrome could be completely different.

1

u/hopfield Aug 16 '19

So? You can still see the source code of your installed extensions. It’s just like a web page.

1

u/Cokrates Aug 16 '19

So what you're saying is that even though they requested access to my browsing history, something that the OP says had to be patched out, since it's open source its all cool.

If I wrote a malicious browser extension would it be okay just because it's open source?

Again, go check OP's response to me, where he says 'Uh...what? No.' then proceeds to write that they released with the issue I said they had. So which is it? Is it 'No' they didn't do that, or 'Yes' they did.

-30

u/Ivu47duUjr3Ihs9d Aug 16 '19

Does anyone else miss the good old days when you didn't need all of this React ecosystem shit just to do front end web development?

Long live pure JavaScript, HTML and CSS. It's come a long way since the old days. It's so powerful now. This JS framework and tools churn with updating dependencies every week gets really old really quickly costing time and money.

19

u/Im_not_depressed_AMA Aug 16 '19

Does anyone else miss the good old days when you didn't need all of this React ecosystem shit just to do front end web development?

You mean.... Today?

4

u/fforw Aug 16 '19

Do I miss the days of debugging not yet documented IE6 bugs without even firebug?

That's a no from me.

7

u/evenisto Aug 16 '19

I work on a codebase that uses jQuery extensively, with some parts of it written in React. Before I came, there was no React, there was no webpack, and there was no dependency management. I do not miss it at all. DOM ops beyond adding basic attributes are fucking pain in the ass in vanilla or jQuery. Any sort of UI dynamism is an even bigger pain in the fucking ass. And don't even get me started on modularity. So yeah, I don't know what kind of experience you have, but you either never worked on a big app in vanillajs, so you don't know the pains, or in React, so you don't know how good it actually is.

6

u/two_in_the_bush Aug 16 '19

There's no reason you can't rewrite all of the dependencies yourself and just have them in your own code base and do the maintenance yourself.

I suspect it would quickly exceed the time taken to maintain the dependency versions though.

6

u/____0____0____ Aug 16 '19

This is where I'm at. A coworker of mine is resistant to front end frameworks, but will happily spend plenty of time just messing around in JS trying to emulate certain functions of those frameworks.

Me? I'm just looking for the easiest way to get what I need to done.

3

u/two_in_the_bush Aug 16 '19

Agreed. My last client had a policy of avoiding frameworks. By the time we were done with the app we had rebuilt an entire rendering engine, state management engine, etc. You know, the things React already does and does really well.

1

u/____0____0____ Aug 16 '19

Haha yeah exactly. When I first started learning angular, vue and most recently React, it became very apparent why these frameworks are valuable. I get not wanting dependencies, nobody does. But you cant manage it all by yourself. Even if you can afford the initial creation, the maintainence is going to be the size of the react team plus your app maintenance.

I'm super happy that you can kind of inject them into a project without fully commiting. I have a giant multi-page web app that I manage and it works well, but I realize so many of my problems could have been solved by implementing one of these frameworks from the get go

2

u/[deleted] Aug 17 '19 edited Aug 17 '19

You really went through that? how did you miss the manual labour involved in getting something going? anything really, from the smallest to the most daring, web-dev was almost impossible back then. the churn was out of this world. You had no build tools, correct, but you did everything by hand, which was time consuming and error prone. It isn't much different now, there is absolutely nothing in the newer specs that helps you to make sense of state and view fragments (components), not to mention scalable applications. web components also just point you to a naked dom node. Just like back then, making a professional site with html, javascript and css would be hard. It would cost you hundredfold the time, effort and code. You still would be on your own without a larger community. These apps tend to be dead slow and turn into a unprincipled mess quick.

React is pure javascript, that's why people like it so much. Today you get get a real project up in seconds, write re-usable components in no time, components that are cross platform by nature btw, and share them with a large community, perhaps the largest the world has seen so far, because we're unified maybe for the first time: web, native and mobile developers.

0

u/[deleted] Aug 16 '19

[deleted]

2

u/acemarke Aug 16 '19

Have you taken the time to read through and understand the motivations for why Redux exists, the inspirations for it, and how it's meant to be used? It is completely different than "storing variables in global window scope".

I'd strongly encourage you to read through Dan Abramov's post You Might Not Need Redux, my post The Tao of Redux, Part 1: Implementation and Intent, and the Redux docs page on Prior Art, which cover those topics.