React isn’t just "winning by default" It's winning because at the core it's just JavaScript function composition. A component is a function, conditionals are `if (...) { ... } else { ... }`, loops are `map()`. JSX is just sugar for function calls. In Svelte you are writing XML with little JavaScript islands inside it. Instead of if you get `{#if}{:else}{/if}`. Thats not "ergonomic" – thats a mini-language stapled on…
React is winning by default and slowing innovation
651–660 of 866 posts
Re: React is winning by default and slowing innovation
#652Web components are the way out of this trap. Every single framework that isn't React should be wholeheartedly supporting web components to make sure that they have access to a viable ecosystem of components and utilities without having to bootstrap an entire competitor to React and it's ecosystem. While a lot of people view web components as competitors to frameworks, they don't really have to be. The just define an…
> Web components are the way out of this trap. Every single framework that isn't React should be wholeheartedly supporting web components to make sure that they have access to a viable ecosystem of components and utilities without having to bootstrap an entire competitor to React and it's ecosystem. I've been using web components using a wrapper to avoid all boilerplate. It gets me 80% of web component functionality…
Re: React is winning by default and slowing innovation
#653Earlier quoted context omitted.
Not only that. My main problem with web components that you end up with a build step anyway. Not every component is interactive and relies on JS, some are just static elements (say avatar image) that you wanna render right away (but at the same time keep styles and logic scoped). Declarative shadow DOM helps, but you end up with a bunch of duplicate code in your final output, which begs the question - why am I using…
Because that was around the time they stopped developing high level APIs to focus on lower level constructs. They wanted to build the primordial ooze from which you would build ui framework s . But it turns out that those layers of indirection have made the web platform just another build target . It's just like how they never added optional types to JavaScript and now TypeScript is the de-facto standard. And now I'm…
Re: React is winning by default and slowing innovation
#654Earlier quoted context omitted.
Hooks are magic syntax without any doubt. All magic syntax is made up of non-magic parts, that's kinda the point. The way you know it's magic is it shatters the principle of referential identity, which tells you that a variable is itself. It pretends you can use a simpler mental model but you really cannot and must not.
Hooks aren't magic syntax. The problem with hooks has nothing to do with syntax. The problem is that the React crowd has decided to overload the meaning of a term that has had a reasonably solid interpretation (at least in comparison to the React crowd). "React Functional Components" have nothing to do with conventional functional programming. They inherently (intentionally?) violate the spirit of functional programm…
Re: React is winning by default and slowing innovation
#655Earlier quoted context omitted.
I have been a part of quite a few tech stack decisions at various companies and startups. I have literally never heard an argument made for react that included merits of the framework itself. The decision was always based on a combination for familiarity, ability to hire for eng roles, and the ecosystem.
Im not sure how this is a negative merit for React. Besides if you are a small company, or a start up, your job is to get things done. Not to embark on a global technology crusade to push your favourite tech. By and large the best thing about react is the overall ecosystem, libraries, talent and ubiquitousness. And thats a good thing.
You aren't arguing on merits. You're arguing on everything else. Why aren't we all still using C? Or B? Why isn't every website on good old PHP?
Things change because people want better or different. Saying "people already use it" is not an argument for something.
Re: React is winning by default and slowing innovation
#656Re: React is winning by default and slowing innovation
#657Earlier quoted context omitted.
Hooks are magic syntax without any doubt. All magic syntax is made up of non-magic parts, that's kinda the point. The way you know it's magic is it shatters the principle of referential identity, which tells you that a variable is itself. It pretends you can use a simpler mental model but you really cannot and must not.
Hooks aren't magic syntax. The problem with hooks has nothing to do with syntax. The problem is that the React crowd has decided to overload the meaning of a term that has had a reasonably solid interpretation (at least in comparison to the React crowd). "React Functional Components" have nothing to do with conventional functional programming. They inherently (intentionally?) violate the spirit of functional programm…
The thing is ... you can model effects with the Free monad (or with Haskell's Backpack as was on here just the other day - https://news.ycombinator.com/item?id=45221112), so they are definitely "functional", for most variations on the definition of "functional" that I know.
Re: React is winning by default and slowing innovation
#658The article talks about innovation in frameworks themselves, but the risk I foresaw was something larger and more pernicious: by being the "go to", but coming with hard to debug weirdness, plus dependency on an unreliable upstream, innovative products cost more to build - effectively slowing innovation across the space as a whole.
That's why I never picked React. Despite it having some good ideas, syntax and implementations!
Re: React is winning by default and slowing innovation
#659Earlier quoted context omitted.
Why would you need jquery today? What can it do that native browser APIs can't?
Jquery is the old default for web apps from before people decided they wanted react. What can it do that others cant? Literally nothing. That didnt and does not stop it from being used for connivence sake. The point is: if its not about the technical quality; why are we not still using it now?
The hiring issue is home made. If companies started hiring for engineering skills, rather than familiarity with existing tech stack, it would change quickly. Experienced engineers are able to learn new languages and frameworks on the job. Of course, if hiring is too petty to give engineers a month of getting familiar with the product and expect readiness from the get go, then they will continue to miss out on talent.
Re: React is winning by default and slowing innovation
#660React isn’t just "winning by default" It's winning because at the core it's just JavaScript function composition. A component is a function, conditionals are `if (...) { ... } else { ... }`, loops are `map()`. JSX is just sugar for function calls. In Svelte you are writing XML with little JavaScript islands inside it. Instead of if you get `{#if}{:else}{/if}`. Thats not "ergonomic" – thats a mini-language stapled on…
So JSX is pure Javascript and not, say, a dialect of XML embedded in JS? Because it sure looks like the former even though it compiles to the latter. React isn't Javascript. It's a franken-language that looks superficially like a mix of JavaScript and XML whilst following the rules of neither. That's why there is such a thing as a React compiler - a good sign that you're not writing JS, which doesn't have compilers.…
So from my personal experience the things you mentioned are non-issues in practice. Do you have a different experience?