Re:Chrome React extension that highlights components on the ...
by eskimobloood on Thursday July 23, 2015 @04:24AM
(#9934580)
Mhmm, all it does is to highlight every DOM element that has a reactid. So it does not only highlight the components but every DOM element that was created by react, so for me this is not very helpful.
Re:Chrome React extension that highlights components on the ...
by jwr on Thursday July 23, 2015 @09:42AM
(#9935628)
Well, I tried it on my React application (https://partsbox.io/ demo) and the highlights do not correspond to React components. As an example, table rows are components, which is not visible.
Perhaps this will be improved in the future, but for now it isn't that useful.
Re:Chrome React extension that highlights components on the ...
by Cymen on Thursday July 23, 2015 @01:06PM
(#9937053)
It's highlighting elements that have the data-reactid attribute. Do the rows not have that attribute? I am also working on a table-based view and all of my rows show up blue.
Re:Chrome React extension that highlights components on the ...
by jwr on Friday July 24, 2015 @04:32AM
(#9940737)
I don't know — everything shows up as blue, some components have a rectangular frame, and some do not. Perhaps the rows are simply not distinguishable from each other because of all the blue around. In any case, it isn't very helpful.
Re:Chrome React extension that highlights components on the ...
by Cymen on Thursday July 23, 2015 @01:08PM
(#9937068)
I wrote the Chrome extension -- it's just a nicer package on a one line hack someone (Pete Hunt? not sure) tweeted. The one liner modified the current DOM nodes while the extension inserts a stylesheet so it will highlight both current and future nodes.
It doesn't highlight at the component level yet. The React dev tools are good at hooking up to components (but I don't know if they rely on dev builds). It would be fun to try to get it to the component level.
Re:Chrome React extension that highlights components on the ...
by insin on Thursday July 23, 2015 @03:35PM
(#9937957)
Showing/hiding the button or changing its state for the current tab seems so comparatively painful to do with a Firefox addon (versus Chrome's declarativeContent API) that the fork is no better than using the bookmarklet which does this, at the moment.
Re:Chrome React extension that highlights components on the ...
by Cymen on Thursday July 23, 2015 @05:03PM
(#9938493)
Ah! I was wondering how you did that (and what Firefox supported).
The Chrome page actions are a little buggy in UX -- when you click the icon, sometimes the URL autocomplete comes down. Maybe it is supposed to and you can put something there programmatically but I don't like it when it drops down. So a fixed icon might not be so bad.
Re:Chrome React extension that highlights components on the ...
by Cymen on Thursday July 23, 2015 @01:12PM
(#9937096)
I also thought about making it have the elements background-color or some other attribute animate from teal to gray over time so new nodes would be brighter. I haven't had a chance to try it but it would be really cool to see visually how many DOM nodes are getting completely rerendered (in other words, how well one is using React).
Re:Chrome React extension that highlights components on the ...
by mike-cardwell on Thursday July 23, 2015 @05:46AM
(#9934782)
If you're going to use React, you may as well use it for the entire interface. I would imagine that the only reason you get sites which use React for only part of the page, is because they're transitioning towards using it for everything.
Re:Chrome React extension that highlights components on the ...
by colinramsay on Thursday July 23, 2015 @11:23AM
(#9936293)
Not at all. I've just started a new Rails project and widgets that would normally be written with a smattering of JavaScript are now self-contained React components. I can't imagine this app ever transitioning to a single-page JS thing.
Re:Chrome React extension that highlights components on the ...
by mike-cardwell on Thursday July 23, 2015 @11:47AM
(#9936484)
I didn't particularly mean a single-page JS app. I meant, that everything on any particular page would be constructed using React components. Rather than a combination of HTML and React components.
Re:Chrome React extension that highlights components on the ...
by mcintyre1994 on Thursday July 23, 2015 @08:19AM
(#9935200)
Isn't this a good thing? It seems encouraging that Facebook use it for pretty much everything - if they keep open sourcing their work on it we'll keep having a really well proven library. Plus it forces them to make thoughtful decisions on things like backward compatibility.
Re:Chrome React extension that highlights components on the ...
by Cymen on Thursday July 23, 2015 @01:13PM
(#9937100)
Really? For me, only some parts of the page are teal/blue. On Instagram, everything is (when logged in). On Facebook, only comments on posts and other UI items related to other people (chat list and some bar on the left).
Perhaps this will be improved in the future, but for now it isn't that useful.
It doesn't highlight at the component level yet. The React dev tools are good at hooking up to components (but I don't know if they rely on dev builds). It would be fun to try to get it to the component level.
[1] https://raw.githubusercontent.com/cymen/show-me-the-react/ma...
The Chrome page actions are a little buggy in UX -- when you click the icon, sometimes the URL autocomplete comes down. Maybe it is supposed to and you can put something there programmatically but I don't like it when it drops down. So a fixed icon might not be so bad.
- for better or worse, it highlights all of the elements with data-reactid attribute so it is a different view than the developer plugin