4 ms·
Yes true, but why should one favor react over e.g. web-components if it is so much slower?
by la_fayette 6y ago
Yes true, but why should one favor react over e.g. web-components if it is so much slower?
- acemarke 6y agoReact and web components are different tools trying to solve different problems. Web components are primarily about trying to add new virtual HTML tags to "extend the platform". React and other frameworks are about trying to build interactive applications that require larger-scale UI management, efficiently, on top of the DOM, by defining pieces of that UI as a tree of reusable components (and using techniques that web components don't have available to them). If I want to add a color picker to an otherwise static HTML page, I might use a color picker web component. If I want to build a meaningful-sized app, I'd reach for React.
- kaoD 6y agoWeb components are not built declaratively.
- la_fayette 6y agoThis declarative narrative is more or less a marketing gag, isn't it? Mixing Logic and Markup has always been an antipattern in web development. However, react calls this declarative and this is the new black now?
- ricksharp 6y agoI’ve been doing web since 1990s and I‘ve always thought spreading a UI element across 3 separate files (often in different locations) was an anti-pattern (or 5+ files In 5 different folders if you want MVC). React is awesome because it allows feature-aligned separation of concerns (each component has a single job - render everything about a specific element - which is usually a well defined part of a specific use case). Jsx is the best UI system ever in terms of productivity - speaking from experience: I’ve implemented production apps using dozens of UI frameworks/platforms - Html, WYSIWYG, Flash, WindowsForms, WebForms, Ajax, Asp.Net Mvc, Razor, WPF, Xaml, Silverlight, Knockout, Handlebars, PhoneGap, Ionic, Bootstrap, MaterialUI, Angular2, React w/ Class Components, React w/ Mobx, React w/ Hooks I can tell you pros/cons of each of those. But at the end of the day I can develop an entire app in days in React+Hooks which would take me weeks in most any other.