5 ms·
I see some point-missing arguments being made here. React isn't for scale. And it isn't to side step learning about html and css. It's main reason for existenc
by statictype 10y ago
I see some point-missing arguments being made here.
React isn't for scale. And it isn't to side step learning about html and css. It's main reason for existence is to make complex UIs easy to manage.
Pretty much the only argument I can think of against React is that it's a boil-the-ocean system.
Once you start doing your UI with it, you pretty much need to make the entire thing use react to really benefit from its model. Having different interlinked components mixed between react and query and what-not is asking for trouble.
But. Building your UI as a description of your current state is so incredibly useful to reason about and prevent bugs, that it's usually worth it to go completely into the system.
The only other major gripe I have is getting time-based elements like animations to play well within the system.
- jukkakoskinen 10y ago"Once you start doing your UI with it, you pretty much need to make the entire thing use react to really benefit from its model." In my experience React is quite ideal for cases where some parts of a site or an app need dynamic behavior. I'm currently working on an e-commerce platform's admin panel, and for us a complete rewrite would have been nearly impossible. With React we can keep the old HTML + jQuery codebase, and implement/refactor stuff as small or as big as we need (e.g. a live-search component or a whole new dashboard view). We're doing something very similar to this: https://github.com/reactjs/react-rails#rendering--mounting https://github.com/reactjs/react-rails#rendering--mounting
- statictype 10y agoRight - it does work and we have incrementally introduced react as well. But that works if the various existing components on the page don't have strong multi-directional data flows between them. At least that's what I've experienced.
- mercurial 10y agoThat's the same thing we're doing at my company (with the aim of eventually replacing the old platform entirely), and it's working out very well.
- coldnebo 10y agoReact is for scale, just not the way you think: React is designed to allow lots of journeyman web developers implement parts of a web page together, such that every component can work by itself and that one component's failure does not break other components, allowing pages consisting of multiple components that may have been dynamically assembled from dozens of different authors to work together. This seems to be a central point that the "I can just do this in CSS/HTML/JS" crowd continually misses. It really doesn't matter that you can do it... It matters that you can dynamically compose your work with hundreds of other people. IMHO, most expert devs don't meet this bar with pure web tech, but unlike the W3C, I don't blame the webdev for poorly composing solutions, I blame the web standards themselves for poorly defined compositional properties. But the platform has at least risen to the level where we can define its behavior ourselves. So I think it's healthy for other sources to push innovation because React upped the ante for Web Components and Web Assembly. The W3C will eventually understand the need for composition and isolation at scale, but they would have taken a lot longer to recognize the use-case without a competing concept like React.