4 ms·
React is a bit less hot today than it was a few weeks ago. What changed is that FireFox released support for Shadow DOM. Also Microsoft is moving to Chromium. W
by flowerlad 8y ago
React is a bit less hot today than it was a few weeks ago. What changed is that FireFox released support for Shadow DOM. Also Microsoft is moving to Chromium. Which means Shadow DOM is suddenly hot and technologies that don’t support Shadow DOM, including React, became a bit cold.
- gbear605 8y agoNo technology becomes more/less hot in a period of a couple weeks, not even JS frameworks.
- taeric 8y agoI want to believe this. However, I also feel bewildered when I check the news of what all has happened in js frameworks in the past 3 years. Especially true, if I consider how different the big frameworks of today are, compared to the same frameworks 2 years ago.
- Vinnl 8y agoReally, if you're talking three years ago, React was already widespread. The main change is that Angular.js back then was still widespread as well, and that Vue wasn't really. Sure, things have changed (e.g. TypeScript is far more accessible today), but if you've been doing React for the past few years, the changes haven't been that drastic, and primarily for the better (e.g. Create React App, that mainly allowed you to forget things, rather than having to learn new things).
- tuesdayrain 8y agoA technology could become cold in an instant if a superior solution was found. I don't think that's true with React though
- gbear605 8y agoAny actually used technology won't become cold instantly because old systems will already depend on it and won't be rewritten immediately
- thomasfoster96 8y agoHuh? React does support Shadow DOM and other Web Components APIs [0]. You can use Web Components in React components just fine. [0] https://reactjs.org/docs/web-components.html https://reactjs.org/docs/web-components.html
- flowerlad 8y agoYes of course you can use Web Conponents in React. But React components are not Web Components and don’t use Shadow DOM.
- thomasfoster96 8y agoI’m not sure what your point is. React components can use Shadow DOM if they want, but they don’t have to. Neither do Web Components. React components can be rendered to DOM nodes, but they can also be rendered to lots of other things.
- flowerlad 8y agoLets say you want to implement this element: <ProductPicker /> You can implement it as a React component in which case it only works in React applications, and will be brittle because of the global nature of js and css. You can implement the same element as a Web Component and now it will work in any application regardless of framework... you can just drop in and it will work. If your application has conflicting css classes or element ids or javascript variables the Web Component will still work reliably. That’s hot! React components will feel a bit cold as cross-framework Web Components take over.
- thomasfoster96 8y ago> and will be brittle because of the global nature of js and css. Modules have existed in JavaScript for several years now, and there are numerous solutions for dealing with global CSS (CSS Modules, Glamor, etc). There are many large production web applications using React, probably generating billions of dollars worth of business - I don’t think they’re “brittle”. > You can implement the same element as a Web Component and now it will work in any application regardless of framework... you can just drop in and it will work. Sure, you can just drop a Web Component into any framework. People use React for a lot more than just defining components - they use it for data fetching, animations, etc. > If your application has conflicting css classes or element ids or javascript variables the Web Component will still work reliably. If this is the case I think you’ve got much bigger problems with your app than choosing which JavaScript library you’re going to use. React apps will work despite conflicting element IDs as well, but they’re still a bug in your app. Web Components don’t magically get rid of JavaScript variables. CSS classes still matter unless your whole app is going to live in the Shadow DOM, which isn’t really what the Shadow DOM is for. > That’s hot! React components will feel a bit cold as cross-framework Web Components take over. Again - you can use both. They solve different problems.
- megous 8y agoSadly, shadow dom in FF is unpleasantly broken for any serious use of web components, up to the latest nighty edition. Focus is broken so you can't tab between inputs. For example, if you compose forms using web components, you'll lose keyboard control over focus movement in your app.
- megous 8y agoAnd it's fixed for FF 65 hopefully. :) Web components are now working fine in FF.