4 ms·
> IMO, React doesn't bring much to the table in this regard while adding a lot of complexity and heft. Strongly disagree with this. In any complex web applic
by actuator 6y ago
> IMO, React doesn't bring much to the table in this regard while adding a lot of complexity and heft.
Strongly disagree with this. In any complex web application with a lot of components, specially ones where a lot of fixed components can live for a while, React is definitely a massive improvement over vanilla JS or something like Backbone which allows wild west.
Imagine state coming from sockets, rest APIs etc with updates being either pull or push. A user might do an action which changes the state in some other component, keeping track of the components gets hard if the state is distributed. Also, centrally managed state with things like Redux allows for good caching of API data which can make a SPA considerably fast.
While I love plain HTML pages which need little or no JS, a lot of applications are better as SPAs.
- megous 6y agoThat's more like redux and company...
- actuator 6y agoYeah, but redux etc gained traction with React, and together they make SPAs good.
- megous 6y agoSPAs were perfectly good before with ExtJS and similar, and more easily extensible too.
- e1g 6y agoExtJS = "What if JSX, but in JSON" ;) For me, ExtJS redefined what's possible on the web a full decade before React/Angular & co, and it's sad that Sencha is now part of a heartless corporate graveyard.
- tomc1985 6y agoSPAs were never good, the entire notion of them or shoehorning full apps into a browser is a farce. But, as parent says, that ship has long sailed
- actuator 6y agoNative apps definitely have advantage in some areas. But web apps give the ability to ship an app to more platforms and not be restricted by app store border control. Spotify had an Ubuntu client which never worked well, but as their web app improved I got almost the same experience as I would have on OS X or Windows web app. This gives equal chance to other platforms and to app developers as well as they don't have to play by rules like 30% cut. As long as we can ensure web browsers can be kept open on major platforms(the only exception right now is iOS), it gives more freedom and choice to non platform developers. I would be really happy if PWA support in web browsers keeps improving going forward and need for dedicated apps gets eliminated for most things.
- tambourine_man 6y agoI'm exactly arguing against this Webpack, Typescript, React, etc approach to web development. I'm more productive in PHP + jQuery, a lot due to familiarity, of course, but I'm also a huge believer in a simple stack. If you've 20+ mutually dependent inputs, maybe you need a better UI, not a complex state management framework. If your browser is ultimately executing an untyped crazy dynamic language, is it worth trying to shoehorn types into it, only to later transpile it back? Not to mention JSX. It all seems so crazy to me, but this ship has long sailed.
- folkhack 6y ago> It all seems so crazy to me, but this ship has long sailed. Nope. And it's why Svelte is something that I've been hard adopting because it looks the closest to old-school JS/CSS/HTML while still bringing some of the same capabilities over that I love from React and VueJS. It also runs without a VDOM or a constantly running event loop - both things are incredibly attractive to me. Although it's not a perfect solution (nothing is) I would strongly suggest you checking into Svelte as it looks more like traditional web development vs. highly complex Webpack + TS + React + eslint + Babel etc etc-based development. The ship hasn't sailed. Your instincts to be weary of such a complex, constantly re-invented toolchain to get traditional development tasks accomplished are a natural response to the craziness that these tools bring to the table.
- mixmastamyk 6y agoSvelte has been on my list to try, thanks for the reminder. I've also liked htmx (from intercooler) for keeping complexity managed. Any comparisons?
- tambourine_man 6y agoI saw the Svelte presentation a few years ago when it was released and my jaw hit the floor hard. That was some cool radical thinking. I haven't used it beyond playing with a few examples, so I can't really tell for sure if it holds up. Everything looks great on the demos. Unfortunately it hasn't caught on, though it maybe be too early to call.
- theknocker 6y agoI think it's underestimated, how far you can get with a simple dispatch loop, a state tree, and some judicious OO sprinkled in for client widget-bullshit events/lifecycle. I'm not saying it's better than React, but it's underestimated.