Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah but React's popularity is because there is demand and expectations for interactive UIs with tons of features that are taken for granted. Users expect basic amount of interactivity and usability that adds a ton of complexity which React offers a good model for.


I feel that, for a discussion on a site with the minimalistic design of HN, the demands of that sort of user are sufficiently foreign that you need a citation.

Not because I particularly doubt that expectations on the wider web are different to HN. Just that the crowd here isn't going to be able to easily understand the people out there. Anyone who expects interaction was weeded out long ago.


I think the core point missed by some people on HN and in dev circles in general is that non-tech people don't expect shit. They accept what they're given, mostly unquestionably, because they don't know any better and couldn't know any better. It's not their domain.

To get meaningful answers about what kind of UI people prefer, you'd have to sit a lot of them in front of several different interfaces, show them around, and then let them use those interfaces for prolonged amount of time, and then - only then - ask which one they prefer. But this almost never happens in the wild, so the market is completely detached from what people want.


Uhh,no. Reacts popularity is because of lazy devs that only know JavaScript and want to use it everywhere. Large companies want to have have one "unified" codebase that runs on all "platforms". It has nothing to do with interactivity or usability because if it did then developers would write native apps with native UIs with much better interactivity, usability, and performance.


React is leveraging Functional Reactive Programming concepts, with the use of lifecycle and other conventions that basically make it easy to reason about events and their effects. Every click/scroll will have an effect on the app state and/or network call, and I actually think a sufficiently complex enough app would end up with React-like patterns or the alternative which is much worse, a ton of repeated code and logic.


Uhh,no. React is popular because devs HAVE to use JS & DOM to do web development in the browser, and they want speed, and to use a library endorsed by a big company. And some of those devs (like me) prefer the unidirectional / function paradigm.


> and they want speed

They won't get it with React. And I'm referring to both how fast the webapp runs and development speed. It gets too complicated too quickly, even for relatively small sites.


Whether or not it seems complicated depends on if you have nailed down the mental model. It's a bit like Git, in that respect.


Complexity is a very real and objective thing. When you can't 100% guarantee your program won't go into an infinite loop when you change a single line, it's too complex.


I don't know of any infinite loop problems in React. I would think they are less likely than using MVC / JQuery style patterns.


Have you done a lot of work with Hooks and useEffect? React changed the entire component lifecycle with the introduction of hooks. All sorts of weird things trigger re-renders now, including when a dependent function changes. You have to surround all of those with useCallback.

I should do a thorough writeup of the infinite loop issue in React.


I've not used hooks yet, but it's on my list to learn. Thanks for the warning though!


You seem to think React is mostly (only?) for building mobile apps.

Most usage of React is for web apps. For most of those, a native UI makes no sense and has massive distribution implications.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: