Live data from Hacker News

React is winning by default and slowing innovation

lorenstew.art

591–600 of 866 posts

Re: React is winning by default and slowing innovation

#591

Earlier quoted context omitted.

I really don't understand this colored functions debate. Async functions are just functions that return Promise instead of T. You can use them in a non-async function but you must then switch to callbacks, because you hold a promise. I don't get how this is confusing, unless you define the whole concept of concurrency in a single thread that runs your UI as well confusing. Hooks are functions that need to be called b…

It's not confusing. It's an observation on their nature. The colouring isn't specific to promises, or even async/await. It applies to continuation style callbacks too. If you haven't, I recommend reading the (original?) article https://journal.stuffwithstuff.com/2015/02/01/what-color-is-...

I read the original article and many surrounding discussions & follow-up articles. Not confusion perhaps, but many see it as friction, including the complaints from the original article. From where I'm looking at, it's just a side effect of dealing with concurrency with no threads, what the article also mentions. So, you know, it is what it is, at the end? Now we have people coming up with different definitions of color (react hooks, in your case) and complaining that it's bad?

This is like when you are doing embedded programming, holding the API functions you need to call in a special sequence to the same standard as people writing their own DSLs with templates.

Re: React is winning by default and slowing innovation

#592

Earlier quoted context omitted.

Javascript has warts, React has warts, Svelte has warts, Python has warts... It's easy to shoot yourself in the foot in any tech - it's leaky abstractions all the way down after all. useEffect usage needs to die, yes. I don't think it's a case against React, given its age. Otherwise, using React is straightforward. I started coding in it without reading any docs. As someone who used Dojo, prototype, ext.js, jQuery (+…

A child who hasn't tasted other mom's food always say, my mom is the best cook in the world. You saying you can be productive in react is just ironic. I just read it as, I can be employable using React.

My brain does this sometimes, sorry :) I meant to say, "I can just be productive immediately in React". Not going to edit though.

edit: also about the moms cooking analogy... With many of those libs/frameworks, I have much more experience with than react.

Re: React is winning by default and slowing innovation

#593
Perspective from an outsider...

I have always been a game dev but recently I made my 1st web-app, and I looked at React and Angular and in the end I just used basic html, css and javascript + jquery. It just seemed a lot simpler to make the final product rather than use more tools to make it for me at a remove of 1.

Though if I was going to make a giant complex website (like facebook or something) then I would consider React, I defo preferred it to Angular cus it had a more "do what u want" vibe rather than "do things this way".

Re: React is winning by default and slowing innovation

#595

Earlier quoted context omitted.

A child who hasn't tasted other mom's food always say, my mom is the best cook in the world. You saying you can be productive in react is just ironic. I just read it as, I can be employable using React.

My brain does this sometimes, sorry :) I meant to say, "I can just be productive immediately in React". Not going to edit though. edit: also about the moms cooking analogy... With many of those libs/frameworks, I have much more experience with than react.

You like jokes

Re: React is winning by default and slowing innovation

#596

I would say react being the default expands to apps that normally would work perfectly server-side rendered. The insane amount of added boiler plate associated with writing an API, tests for the API (including contract tests), API documentation, API versioning concerns, deployment timing considerations; front-end API integration, front-end state management, front-end tests, API mocks, I feel like there's about 10 mor…

You might not even need fancy techniques to have UX similar to a React app. When the page load is fast enough, browsers hide that it happened. This means you can afford to do everything in the backend and just send plain HTML over to the user. For example the Decision Drill[1] application performs a complete page load on every interaction, but the server is fast enough that at least with my internet connection, it feels to me like the corresponding React-based application would.

[1]: https://xkqr.org/decision/

Re: React is winning by default and slowing innovation

#597
post #472

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…

I feel like you must have learned JavaScript and React concurrently to have a belief like this.

Re: React is winning by default and slowing innovation

#598
post #528

Earlier quoted context omitted.

The problem in this case is not the HTTPS connection, but the fact that browsers, when importing ES6 modules, import all their transitive dependencies one by one. This means they can make a bazillion requests under the hood when importing just one library. A CDN is likely to have the library bundled and minified with its dependencies, turning those bazillion requests into a single one, which is much faster.

In that case, if you’re actually talking about bundled versus many-files, please don’t say “CDN … if you want a faster initial page load”. Public CDNs made some sense as performance advice long ago, but now they never really do, but there are still many people who don’t realise it.

You're right. That was a bad choice of wording on my part. Thanks for clarifying!

Re: React is winning by default and slowing innovation

#599

Earlier quoted context omitted.

“syntax sugar” means its a new language. It has a new syntax.

This is the first time I've seen someone argue that adding syntactic sugar means creating a new language.

it really depends on how much syntactic sugar you add.

You could go back 13 years, show somebody some JSX and ask them what language they think it is and nobody would be well that's obviously JavaScript with a bit of sugar on top.

Re: React is winning by default and slowing innovation

#600

Earlier quoted context omitted.

It's not confusing. It's an observation on their nature. The colouring isn't specific to promises, or even async/await. It applies to continuation style callbacks too. If you haven't, I recommend reading the (original?) article https://journal.stuffwithstuff.com/2015/02/01/what-color-is-...

I read the original article and many surrounding discussions & follow-up articles. Not confusion perhaps, but many see it as friction, including the complaints from the original article. From where I'm looking at, it's just a side effect of dealing with concurrency with no threads, what the article also mentions. So, you know, it is what it is, at the end? Now we have people coming up with different definitions of co…

I'm not complaining it's bad per se. As I said, it's an observation on their nature.

I would not say it's a different definition of colour. I am somewhat contorting the original definition in the article, but if you compare characteristics listed, many/most of them apply to hooks also

Post reply on HN