React 19

307 points by gajus 7 months ago | 499 comments
  • robertwt7 7 months ago
    Why do a lot of people here hate react so much? I started my eng career with Laravel and plain JS. After working with React, I've never seen anything like it. I feel like building scalable apps is achievable and front end is fun with it. Even when moving between different tech companies, working with React again is such a breeze and easy to pick up. On top of that, with the TS support, huge community libraries, I feel like I can build and scale anything quite easily. why are these new features "scaring" people away? we can still build with SPA or the old ways. I don't think anyone complaints when NoSQL DB was released or when spring boot was released in 2014? what about when Kotlin was released? we don't have to use them if you don't want it.

    Weren't jetpack compose and swift UI inspired by React? I saw it somewhere in the android docs and now its probably deleted, I can't find it anymore.

    But then again, I don't have "decade" of experience in tech, yet. I have no idea if building huge web apps (i.e airbnb) using jquery or plain js with large teams is as enjoyable back then? My thought process is changed, I can't even think on how to solve the state management, dom manipulation, side effects etc with plain js anymore.

    Nowadays I just built on what I'm familiar with and focus on what I want to build. who knows, maybe in the future I will also complaint about new frameworks and mention how good React was :)

    • gejose 7 months ago
      I also really don't get the apparent hate for react, usually from people who haven't used it all that much.

      I've interacted with a not insignificant number of people who seem to hold this opinion. Usually their arguments boil down to one of:

      * Frontend engineering is always chasing the next shiny thing, and react is one of them. There's probably some truth to this historically, but react has been a thing since 2013, and pretty 'mainstream' since 2015 or so.

      * Frameworks and libraries add 'complexity'. I almost never hear anything specific when I ask about what complexity they're referring to. IMO if you work on a non trivial application without a framework, you'll just end up inventing your own poorly maintained, poorly tested and poorly documented framework. This might be fine for a weekend project, but rarely something you should do at a company.

      * People also often complain about the compilation/bundling step. This might've been harder to manage historically, but now with battle tested frameworks like expo, nextjs, meteor etc, there are very few reasons to write a webpack configuration or build pipeline by hand.

      • tunesmith 7 months ago
        I hesitate to admit this, but for me it's simply because I still don't know the right pattern to use. I'm a longtime backend developer that knows several useful and usable patterns on how to organize layers of code into files and functions and conventions, that work very well. I've spent quite an amount of time on the frontend, to the point where I feel like I should have been able to identify a decent pattern by now, and I just haven't. And it's to the point that I started doubting whether the problem was really me, or if it's a problem with the framework. I've read the revised React 18 docs backwards and forwards, and all the stuff about how you might not need useEffect, and I've read countless articles about outer components and inner components and view components and higher order components, and when to use context and when not to, and there's a point at which all the patterns start to collide and feel self-contradictory. Meanwhile my team has a massive snarl of very large react components with all kinds of awful practices like nested contexts and useEffect for state management, stuff I tried to counsel against for a while until I got promoted away from the team... I just couldn't find the best practice that the community actually agrees upon regarding how to refactor and design a complex website with many components with deep functionality.
        • h14h 7 months ago
          I feel this. I think it's a consequence of react being a fairly unopinionated collection of tools.

          Coming from a Rails background, it's pretty jarring. It's like the difference between being told, "Here's how you build a house" and "Here's how you use the tools in this toolkit".

          React offers more freedom at the expense of guidance, and you get much less standardization as a result.

          • gejose 7 months ago
            I actually agree with this being / having been a problem.

            I think the root cause of this is react not really being a framework, rather just a library that allows you to write declarative code involving state that in the end, outputs a DOM tree. IMO it does that quite well.

            It doesn't have very many opinions on how you should structure your code, how you should organize your state, how your routing logic should work etc. I think that's where frameworks come in. React was quite popular long before frameworks like nextjs, meteor, remix, ... became 'mainstream', causing lots of developers to invent their own (poorly maintained) frameworks.

          • dansiemens 7 months ago
            > I also really don't get the apparent hate for react, usually from people who haven't used it all that much

            In defence of the haters, I think we’ve all seen our share of horrendously organized React SPAs. Dependency hell, (seemingly) infinite prop drilling, components thousands of lines long, the list goes on.

            Some people think they hate React, when in reality they hate a specific implementation of it.

            • lowercased 7 months ago
              I contracted on a few different projects over a few years, with React involved in all of them. Each team had their way of doing something, and goodness me... each team I joined was way different than the previous one with respect to approach, style, testing, etc. And anything I did that was "wrong" (meaning, not to their particular approach), I was ... belittled or talked down to as if I was some imbecile. In a couple cases, I used an approach with company B that they'd discarded a year before, but 6 months earlier, my work with company A's team led us down adopting that same approach, with decent results. But company B knew better, saying that approach was 'crap' (but... looking at their own internal docs, 2 years earlier, it was the hottest approach).

              I was shocked at how much time some teams spent on reinventing wheels rather than using some off the shelf components. "We need everything to be done in house so we can document it and have full control". But... designing all your own widgets is going to take months. "React makes it easy though, so don't worry - we know what we're doing' Yet... they didn't - untestable components that couldn't support what the original requirements called for months earlier, etc.

              You know how people crap on PHP because there's so much 'bad' PHP out there? But others say "it's just how you use it - frameworks XYZ are great!". I feel the same way about React. There's probably some great examples out there, but I somehow tend to see a lot of lesser quality stuff.

              Most of the use cases I've seen up close... there wasn't any real magic or benefit to React vs something else, but everyone was jacked to get more React experience on their resume for their next gig. It didn't really matter if the resulting output was good or not, just that they used React.

              I don't hate React - it's a library. I'm tired of much of the B-team players requiring it to be considered "professional" (while simultaneously) eschewing testing and documentation).

              For people who have chosen it, and get to stay on the same project for several years, honing their skills on one codebase and iteratively improving, great. Enjoy.

            • petre 7 months ago
              It was pushed upon me by management. I would have opted for Svelte or Lit. So I hate it, I hate writing code in it, I hate that it wants to control all your DOM, I hate how they "re-invented" HTML with JSX components and how the code now looks like PHP, as JS wasn't annoying enough by itself. I hate how it makes accompishing even simple things a PITA. At least I can use Vite and not bother with their opinionated tooling. There you have it, these are some reasons for all the hate if you had to ask.
              • baq 7 months ago
                > I also really don't get the apparent hate for react,

                The hoops I have to jump through to get the back button working.

                • Bilal_io 7 months ago
                  > I also really don't get the apparent hate for react, usually from people who haven't used it all that much.

                  Same for people that have never used Angular, or only used the old AngularJS 1.x

                  I have more experience with Angular, but I don't hate any of the other frameworks, I've built apps with React, Svelte and tried out Vue.

                  • xcrunner529 7 months ago
                    Show me one performant and nice react app. Even the creator can’t.
                • troad 7 months ago
                  The vast majority of websites don't need to be 'apps' at all. A few do, but these generally need to be tailor-made anyway.

                  The trend to shove web frameworks into everything has ushered in a nightmarish decade of slow, dysfunctional websites, that - despite being over-engineered to high heaven - hardly deliver an improved user experience compared to what we had in 2008.

                  There's a class of frontend dev for whom - no matter the question - the answer is always some unholy combination of React / Node / Vite / Angular / Vue / Nuxt / Next / Bun / Deno / Svelte / SvelteKit / etc - preferably running across two dozen Docker swarms, ruled by the Red Queen (kubernetes). "Oh, you want to put your CV online? Sure, let's spend the next three weeks plotting out the state flow diagram for your 'app'... "

                  The reason React is particularly disparaged, imho, is because the framework fashionistas have moved on to chase the new shiny thing, and everyone else has always hated all these frameworks to begin with, so there's no one left to defend this particular hot mess. The same fate awaits the rest of the frameworks, in time.

                  • bufferoverflow 7 months ago
                    React (and similar frameworks) make the code much more maintainable. You basically define your state and how that state should look like. You don't manually change your UI, it just re-renders when your state changes.

                    Compare it with the nightmare of JQuery, where any line of code can affect any UI for whatever reason.

                    • troad 7 months ago
                      I understand what React does. My point is that what it does is unnecessary for the vast majority of websites, and I stand by this.

                      > Compare it with the nightmare of JQuery, where any line of code can affect any UI for whatever reason.

                      False dichotomy, and a somewhat strange one, given jQuery and React aren't even remotely aimed at solving the same problem?

                      You're free to stick to a functional paradigm in JS without requiring the overhead of React (and all the cruft that tends to pile up around React - build systems, compile times, masses of dependencies, the inevitable CVEs for those dependencies, etc.)

                      But more importantly, I'd respectfully note that you're pre-supposing that UI state rightly lives in JavaScript, which is a point of view already limited by framework-centric assumptions.

                    • xcrunner529 7 months ago
                      Yep. A simple shopping site or tweet site doesn’t need to be an “app”. These devs are up their own asses thinking they need an app for their stupid (and simple) idea because it’s easy for them and they are “engineers” and we’re all stuck with delayed reactions, missed/double clicks, and broken middle clicks (X, Target) on every click now. Some app.
                      • gejose 7 months ago
                        This reads like the perspective of someone who really doesn't understand nor appreciate the real world complexity and technical trade offs involved in building something like twitter or a shopping site
                        • para_parolu 7 months ago
                          My bank website uses very old js and no react. Yet middle click doesn’t work (as well as back button). These problems have nothing to do with framework/library.
                          • bardak 7 months ago
                            I think I despise throbers and spinners more than slow page loads at this point.
                          • absqueued 7 months ago
                            I was talking to my classmate from x10, and he said to have shipped one page app with WP backend, React frontend in Azure VM :|

                            Incurred a bill of $800, and reached out to me. Gobsmacked!!

                            • notapenny 7 months ago
                              > The reason React is particularly disparaged, imho, is because the framework fashionistas have moved on to chase the new shiny thing, and everyone else has always hated all these frameworks to begin with, so there's no one left to defend this particular hot mess.

                              I think you're projecting here. Its fine not to like trends in tech, but tech will change whether you like it or not. The people who jump on every new thing and stress about having to learn it all will keep doing it. That doesn't mean that anyone else hated it all to begin with. That's a pretty weird assumption to make. Even this thread is full of people who enjoy using React. Meanwhile, React is pretty stable and boring if you ask me. Your nightmarish decade will be extended. I'll light a candle for you.

                              • nsonha 7 months ago
                                the vast majority static "sites" don't need to exist at all, how about that?

                                It's the apps with unique requirements that need to be coded, not some pages that present some info in some way that's slightly different, stylistically, and not standard at all.

                              • slmjkdbtl 7 months ago
                                I think the class era is a decent, normal, boring and useful UI framework, however hooks are very difficult to use:

                                - How things actually work are very hidden and unintuitive

                                - Very easy to make mistakes, easy to write low performance UI

                                - High cognitive load, constantly thinking about how many times things run, what's in dependency arrays, what should go in useCallbacks and useEffect etc

                                - Overused, part of community sometimes encourage people to use React and some dependencies that's unnecessary for the project, only adding overhead and complexity

                                - Easy to mix business logic with UI logic

                                • imbnwa 7 months ago
                                  This is the whole thing right here in this comment.

                                  I work with mobx at work which just does a better job of letting us focus on business logic. Components observe computed models directly, no prop drilling, no context. The `createTransformer` map function is the key to mapping dynamic collections to computed models, handles GC in cases where you want to go from computed model to another computed model so you don't manage a bunch of WeakMaps yourself.

                                  The React maintainers and community buy into complexity too readily. Probably why SolidJS (which unlike mobx also provides the view layer) is gaining traction.

                                  • craigdev 7 months ago
                                    So glad to hear I'm not the only one doing this. I built and manage a very large and complex internal tool that we started building in 2019 before the full switch to functional components and Hooks happened. We use MobX and it has been great for us. Somewhat recently I was considering refactoring to use functional components just to be forward thinking. I was realizing that useEffect and other hooks could almost completely and entirely be avoided if you simply used MobX stores (like we already do), and local component scoped MobX stores where necessary. It keeps state management consistent throughout the app, and avoids the complexity of useEffect and other hooks. Like you said, components just observe. I started wondering why I didn't see this pattern more often out in the wild. It just seemed to be very straight forward.

                                    What's surprising to me is that React 19 seems to be doubling down on hooks, adding more cognitive load by increasing the number of hooks you need to be aware of and their particular behaviors and requirements. Doing that instead of moving toward the more universal reactivity model that MobX, SolidJS and even frameworks like Svelte 5 are starting to adopt.

                                  • XeO3 7 months ago
                                    Yep. One thing I noticed that how intuitive it was to implement setInterval in class. However, in hooks, you probably need a guide for that.

                                    https://overreacted.io/making-setinterval-declarative-with-r...

                                    • gejose 7 months ago
                                      > easy to write low performance UI

                                      I agree with this. Luckily there's some work being done on this - check out the new React Compiler[1]

                                      > what's in dependency arrays, what should go in useCallbacks and useEffect

                                      This lint plugin[2] from the react team helps quite a bit with this

                                      [1] https://react.dev/learn/react-compiler [2] https://github.com/facebook/react/tree/main/packages/eslint-...

                                    • terandle 7 months ago
                                      jQuery fell apart HARD when you started to build larger/more complex apps with it. I don't think there is anyone actually nostalgic for that time that actually went through it. For a while SPAs had their own disadvantages vs MPAs but newer web standards and SPA frameworks adopting SSR have basically solved those problems nowadays.
                                      • olavgg 7 months ago
                                        I have built large and complex front-end applications with jQuery. It worked great, no complaints.
                                      • hipadev23 7 months ago
                                        > I don't think anyone complaints when NoSQL DB

                                        A lot of us complained, very vocally, about how bad MongoDB was.

                                        https://www.youtube.com/watch?v=b2F-DItXtZs

                                        • wildpeaks 7 months ago
                                          It's framework exhaustion: when you want to nail something to the wall, you don't want to have to spend hours figuring out what's the latest magic formula needed to get Hammer to work, especially when you had to do it so so so many times already and the new way isn't fundamentally improving things and concerns are dismissed.
                                          • meiraleal 7 months ago
                                            That's exactly how React changes pushed by Vercel broke it and had the tipping point for the react fatigue we are discussing now
                                            • SebastianKra 7 months ago
                                              This is why I find this discussion so paradoxical. People, who are tired by the rapid change in Frontend-Dev, are surprisibgly eager to jump away from the most stable and backwards-compatible framework in this space, for which all the problems are known and mapped out.
                                          • bromuro 7 months ago
                                            I spent last 3 decades building web sites and web apps - and I agree with you. I don’t find alternatives as appealing as react.
                                            • anonzzzies 7 months ago
                                              I hate it because of announcements like this; we are, as a small team, just getting to terms with react 18; a lot of libraries still are not working well with it and there is 19 already. It sucks.

                                              So yeah nothing wrong with the concept of react, just the usual and terrible javascript ecosystem churn with stuff we don't need, but now everyone will have to update and so do we. Nice if you have a dedicated frontend team for every of your apps, not so nice for a small team that has to manage many apps across many clients.

                                              I like major (potentially) compatibility breaking updates every 10 years or so, not every 3 weeks.

                                              So yeah, we went off react to vanilla js, htmx and liveview type stuff which makes this all far simpler. Dev is also far simpler for us; all the pitfalls are no longer there. There might be some advantages to react in some cases; we won't look back; we never had a more relaxed team especially since we ditched nextjs and react; the trying out of other tech for frontend made us realize react was wrong for us all along anyway. ymmv of course.

                                              • mephitix 7 months ago
                                                React 18 was released in March 2022 though. It’s been over 2 years, not 3 weeks. I’ve also actually thought the React team is pretty careful about breaking changes. Their 19 breaking changes doc is mostly about removing already-deprecated APIs.
                                                • robertoandred 7 months ago
                                                  I guarantee rebuilding your whole site in htmx was more effort than installing React 18 when it came out three years ago.
                                                  • phist_mcgee 7 months ago
                                                    I'd also venture that this was a backend dominated decision to take control of the full-stack.
                                                  • KronisLV 7 months ago
                                                    > ...just the usual and terrible javascript ecosystem churn with stuff we don't need, but now everyone will have to update and so do we

                                                    I don't think that there are many good options for front end that are maximally stable out there:

                                                    https://endoflife.date/react

                                                    https://endoflife.date/vue

                                                    https://endoflife.date/angular

                                                    Unless you want to look at something way more niche, you probably won't find something that has a main version supported for 5-10 years without major changes. Then again, that's usually not even the case with back end frameworks either, the closest you can get is either language runtimes like JDK (2014-2030, albeit the open source versions seem to end support in 2026), or maybe OSes like RHEL (e.g. 8 has a support timeframe of 2019-2029 or the extended option is until 2032).

                                                    In short, there is churn everywhere and I don't think you can simply pick any stack that is used for web development and will get exposed to the world (and therefore needs security patches), that will still work okay with no breaking changes along the way in 5-10 years or so. The only difference is how bad the individual choices will be.

                                                    • mendocinox 7 months ago
                                                      how many libraries does your project depend on?
                                                    • roflmuffin 7 months ago
                                                      You seem to speak as if the only choices are React and jQuery style DOM manipulation. React isn't the only framework you can use to build scalable web apps.
                                                      • robertwt7 7 months ago
                                                        Oh i agree, but I never said those are the only choices. I was only exposed to React and a bit of Vue and Angular after Jquery so I'm speaking from my own experience. I am planning to stick with my choice that's all. My argument was mostly towards the hatred of react.

                                                        as for why I personally choose React was due to the job market, community support, debugging exp, TS support, and JSX just felt much more natural to me. I don't go everywhere hating other frameworks though. I think its good that we're tackling the same problem with different solutions, we have more choices.

                                                        • 1shooner 7 months ago
                                                          > I am planning to stick with my choice that's all.

                                                          >as for why I personally choose React was due to the job market

                                                          From my experience, this is the problem, and I don't know that anyone is to blame for it. React's success has created skill drift away from the web platform. When I first started as a web team manager, my new hires knew the fundamentals of web standards: html, css, js, and some libraries to make those easier to work with.

                                                          Now, most entry level web devs know some flavor of React, full stop. These aren't Bay area web engineers, these are the web mechanics that need to get into whatever is thrown at them and keep it working, or make it start working again. I know losing grip of the platform is short-sighted in principle, and for the purposes of my team is immediately impractical.

                                                      • wruza 7 months ago
                                                        I hate it because when I take it, instead of UI programming I now have to satisfy some absurd ideas about how functional async meta higher effect bullshit should work. All I need is to process events and update MY model (not some convoluted async representation of it smeared across visual elements and their lifetimes), from which something would update control values and text blocks. That's not literally all I need, obviously, but I don't need react nonsense in my way. In case anyone curious what I'm using, see mithril.js.

                                                        Also react uses (or promotes) web-hostile anti-features like document level event handling and virtual scrolling, which are PITA from a devtools tinkerer perspective.

                                                        useActionState: is a new hook to order Actions inside of a Transition with access to the state of the action, and the pending state. It accepts a reducer that can call Actions, and the initial state used for first render. It also accepts an optional string that is used if the action is passed to a form action prop to support progressive enhancement in forms.

                                                        Delusional gobbledygook.

                                                        • gejose 7 months ago
                                                          > I now have to satisfy some absurd ideas about how functional async meta higher effect bullshit should work. All I need is to process events and update MY model (not some convoluted async representation of it smeared across visual elements and their lifetimes), from which something would update control values and text blocks

                                                          Could you elaborate on this? I'm not sure what an "async meta higher effect" is.

                                                          Reading in between the lines though, I suspect you're talking about state management. You might benefit from one of many state management solutions out there - redux, mobx, legend-state etc. Keeping and passing around local state spread out across lots of components can get unwieldy pretty quickly.

                                                          • wruza 7 months ago
                                                            State solutions solve a self-imposed problem. With mithril I just do whatever I want cause it doesn't dictate shape or behavior to my data. I don't have to pass it around (except naturally) and event-ize up-and-down, cause it's easily accessible and lives outside of a vnode/element tree. Although data can be put into vnode, if it really belongs to its graphical state which would make no sense in its absence, e.g. current 'uncommitted' value in an input.

                                                            benefit from ... Redux

                                                            >_< had a good laugh, thanks! I imagine writing a hierarchical reducer every time I have to update x in {a:{b:[...,x,...],c:{{{...}}}}}-like structure. Mobx is close, but in the same "unengineering of overengineering" category.

                                                            (Edit: I don't think that parent comment deserves graying out, I'm always happy to elaborate on subj)

                                                        • lakomen 7 months ago
                                                          I worked with AngularJS, Angular, Vue, Svelte and now React. I tried React time and again but found it to be too complicated and ineffective. I like Vue best. But lately I have completed a few React projects, because of a graphql package that's only available for React. The current state of React is pretty good IMHO. There are some things you need to get used to, but that's the case in every framework, when in Rome. The SPA side is great, it also ranks well. But the SSR side is awful. Absolute nightmare. And it's moving too fast. Vue is vue and code from v2 even works with v3. React will now stop being easily embeddable without a compilation step.
                                                          • subarctic 7 months ago
                                                            Probably because there's a lot of codebases out there that use react that are in a pretty bad state - that are a few versions behind and can't be updated easily due to breaking changes, have a mix of various old and new libraries and patterns for doing similar things, that don't use typescript, or that do but use `any` everywhere. It's a great ecosystem but it's evolved so much and there's my so much variety of ways to do things that it takes a lot of discipline to keep your codebase in good shape if your team is over a certain size.
                                                            • epolanski 7 months ago
                                                              I don't personally hate React, I use it for all my personal projects.

                                                              But I try to stay away from it at work and I would rather push Vue 3.

                                                              There's few reasons:

                                                              - React does not really have a framework as good as Nuxt, which is light years ahead of the terrible mess of Next, and much more solid than Remix (which oddly comes also out with questionable stuff baked in)

                                                              - React is easy and funny to learn, but it's tough to master properly when it comes to few several key aspects like..There could be a PhD in hooks complexity, and all of that to avoid using class based lifecycle which was uglier but...much easier to manage

                                                              - Performance. It's just not good as on alternatives. At some point you scale, SEO and performance matter, React bites you back. There's many issues I could list from server to client side rendering and this will never be fixed due to how React's rendering works. Not only that but on React alternatives like Nuxt you end up thinking about performance way later

                                                              - DX on aspects like styling. I've tried everything and the DX of authoring and maintaining the style of react components is just meh

                                                              • 7 months ago
                                                                • int_19h 7 months ago
                                                                  I think React receives a lot of negative sentiment that is really directed more at SPAs in general.
                                                                  • curtisblaine 7 months ago
                                                                    SPA hate is mainly from backend developers who don't want to learn the intricacies of ui development. I get it, at least from their POV, but that doesn't make it justified.

                                                                    SPAs might be a good idea even for simple / low traffic apps, if you don't want to write and maintain a backend. SPAs are easy to statically host on a CDN. They don't technically "run" 24/7, they can't "go down" unless the CDN does. They can use a serverless platform API like Firebase and Supabase. They can be hosted for free at low traffic. Compare with rolling, monitoring and maintaining your own server, ssh-ing if it goes down, dealing with auth, containers, VMs etc. If you want to prototype, it makes much more sense to write a SPA.

                                                                    • azangru 7 months ago
                                                                      Your second paragraph is entirely developer work.

                                                                      At no point do you change your focus to what works best for the user. Who is the user; what kind of devices does he use; what does he want to accomplish on your website; what does he need to accomplish that; etc.

                                                                      • int_19h 7 months ago
                                                                        SPA hate is mainly because there are so many broken (navigation etc) SPAs that would have been much better as regular websites.
                                                                    • RomanPushkin 7 months ago
                                                                      > Why do a lot of people here hate react so much?

                                                                      It's not a pleasure to work with.

                                                                      I know quite a few programming languages, ~20 years of software development career. And React is the worst tech.

                                                                      Don't get me wrong, but I wrote a lot of React code at work, and used it for personal projects (for example: make210.com)

                                                                      But every time you touch React you're getting this distinctive "meh" flavor that tells you - oh yea, baby, it's because you're dealing with React.

                                                                      • makingstuffs 7 months ago
                                                                        Yeah I agree with you and I have been around for a while. I do feel that there is a lot of elitism from those who hate React. The same as you get in any industry.

                                                                        When I was doing audio engineering professionally you would find a bunch of engineers who had the same sort of mentality about outboard equipment. Specifically modern outboard which uses switching power supplies and the like in order to reduce power consumption and, ultimately, the cost of the gear.

                                                                        You can’t help but feel a lot of people feel threatened by advances in technology as their ability to gatekeep diminishes with every iteration. In the audio example you’d no longer have to spend thousands of pounds on a Neve preamp to get a professional sound. You can buy a focusrite interface for a couple hundred and have decent sounding recordings.

                                                                        Likewise with React/Vercel/NextJS. With those advancements a person (I don’t say dev as the docs make it so most people can fumble their way around) can deploy a simple website in a week or less depending on their personal ability to learn. As such those who made a living overcharging to make a simple site for a local business are seeing their income diminish.

                                                                        Just my theory, anyway.

                                                                        • plaguuuuuu 7 months ago
                                                                          Many have experienced horrible React projects - after Angular fell out of fashion with the enterprisey crowd, React became the default framework so a bunch of bicycle brain teams adopted it. React actually has a bunch of unintuitive footguns so without adequate care, working on it becomes pretty disgusting and results in emotional trauma.

                                                                          And anyway... the weird parts about React are kind of weird... some people just like Svelte more ;)

                                                                          • gloosx 7 months ago
                                                                            Eeeeeasy, here is the whole journey for you:

                                                                            0. People are coming to React after doing X years of that other thing, which was was not necessary related to user interfaces at all, was not procedural or reactive

                                                                            1. People are super confused by something reactive and procedural, it feels too "complex" and something messy usually comes out of their fingertips

                                                                            2. People think what if they sign for React, they automatically sign for react-router react-video-player react-redux react-custom-div-tag react-img and so on, bringing a ton of unnecessary dependencies to the project and crying out loud that this "whole React framework" is too complicated and nuanced

                                                                            3. People don't bother going through official react handbook thoroughly and understanding that react is nothing more than a handful of hooks, which can solve every user interface problem in an effective way. Instead they watch 10-minute video on 2x speed which tells them to npm react-router, react-redux and react-custom-div-tag

                                                                            4. People end up with a monster, which makes them cringe every time they are looking at it, and they can never ship it

                                                                            5. People go and produce a big rant post to spread the hate with the title "How/Why I quit React and went back to Laravel, then finally shipped", sharing it here on HN

                                                                            • azangru 7 months ago
                                                                              > People don't bother going through official react handbook thoroughly and understanding that react is nothing more than a handful of hooks

                                                                              React is 10+ years old. Hooks are about five years old. There was react before hooks; and people who hate react don't always do so because they failed to learn the hooks api...

                                                                              Also, the official react documentation is, predictably, a living document that keeps changing. I guarantee you that when react hooks were introduced in 2019, they were presented as a more convenient alternative to lifecycle methods, with a near-direct correspondence between the component lifecycle methods api and the hooks api. The useEffect hook was presented as a better and more powerful componentDidMount + componentDidUpdate combo. There was no talk of "you might not need an effect", which came out of several conference talks and culminated into a separate article in the docs. The first version of that "you might not need an effect" article appeared, according to github history, in 2022, three years after the early adopters had started using hooks including the useEffect. You were never supposed to update the state during render; now you are. You were always allowed to read component class properties during render; now with useRef, you aren't. And after all these years, react still seems to be in denial that sometimes you want some actions to happen only once over component's lifetime, upon its mounting; and you have to fight with the strongly encouraged StrictMode component for that privilege...

                                                                              • gloosx 7 months ago
                                                                                >There was react before hooks;

                                                                                React pre and post 16.8 are two completely different libraries. I remember 2019, hooks we presented as a replacement to lifecycle methods and class-based components at all, not as alternative. The useEffect hook was presented as something which let's you split your code based on logic instead of component lifecycle, and few examples were there showing how the new effect concept better splits the async logic which was previously a solid mess inside the componentDidMount/Update.

                                                                                >in 2019, they were presented as a more convenient alternative to lifecycle methods

                                                                                Again, no one presented hooks as an alternative, it was strictly a replacement for class-based components which were obsoleted.

                                                                                From the rest of it I see you have a very big problem with react, "you might not need an effect" article was written for folks like you. Update the state during render? what? if you need to read something during render you need to use State, and if you need a reference to a variable outside of React you use Ref; there is a clear way to make a side-effect happen only once over component's lifetime, which is to use Effect without dependencies. StrictMode component has no use other than debugging.

                                                                            • RexFactorem 7 months ago
                                                                              [dead]
                                                                              • lmm 7 months ago
                                                                                HN has long had a huge anti-Facebook bias, I wonder if it's just that.
                                                                                • alephxyz 7 months ago
                                                                                  I don't think so. Comments about PyTorch or llama are always extremely positive.
                                                                                  • lmm 7 months ago
                                                                                    I didn't even know they were Facebook. Do they actually get used in Facebook-the-product in a user-facing way?
                                                                              • demarq 7 months ago
                                                                                Awesome release.

                                                                                I feel sorry though for someone getting into frontend dev now.

                                                                                > is a new hook to order Actions inside of a Transition with access to the state of the action, and the pending state. It accepts a reducer that can call Actions, and the initial state used for first render. It also accepts an optional string that is used if the action is passed to a form action prop to support progressive enhancement in forms.

                                                                                I’m pretty sure it’s a cool feature but, what a mouthful. Imagine you decided to start developing websites today, how do you even start?

                                                                                EDIT: React is still an exceptional framework and this release is certainly an improvement.

                                                                                My criticism is more FE development in general not just React.

                                                                                • OtomotO 7 months ago
                                                                                  My tip: you start by avoiding React altogether.

                                                                                  It sounds bad, but if you can, do oldschool SSR with HTMX or the like.

                                                                                  It's sooooo much better. I was paid to develop frontends in React for 4 years, I wrote my first website in 2005... I am currently migrating one client project from React to HMTX and it's sooooooooo incredibly much better.

                                                                                  There are less bugs, less footguns with wrongly applied hooks...

                                                                                  If you need to do CSR, use Solid or Vue, but don't do React.

                                                                                  If you have no say in it: good luck!

                                                                                  • exceptione 7 months ago
                                                                                    The problem I have with many of such advice: 1) what do you precisely mean and 2) why do you think so.

                                                                                    Do you mean the whole field, so from B2B SPA apps to personal blogs? "If you want to replace jquery, use Vue!" would be more helpful to understand.

                                                                                    The problem is that we don´t know if the advice comes from a "bootcamper" that has only learned Javascript. You know, some people manage to build low-interaction sites that will render a blank page when Javascript is disabled.

                                                                                    The "why" is also of interest to see if the advice is applicable. If not react, then why not preact for instance?

                                                                                    • hirako2000 7 months ago
                                                                                      My main dislike for React is that I'm constantly learning React, its intricacies and idiosyncracies.

                                                                                      Disproportionate amount of energy I would rather spend learning JavaScript, something that would last.

                                                                                      Using React since 2013. Each release is an excitement, until I realise some chunk of concepts which altogether took months to fully grasp, are gone. Some even needed to be unlearned.

                                                                                      A lot of abstractions.

                                                                                      React doesn't make you a better developer, it makes you a better React developer.

                                                                                      I don't feel that with Vue. I don't feel that with most libraries I use.

                                                                                      • agumonkey 7 months ago
                                                                                        I think most people arguing against react are against "advanced" ui libs at all. simple dom + a thin porcelain like htmx does help you finish most work duties without having to add a whole paradigme over.

                                                                                        And anecdotally, if your team is not ready/willing to dig in react, all its benefits will fail to materialize, you'll have a bunch of patched up libs and components trying to do what htmx or similar seem to offer (async actions over REST) for just a few lines in your html template.

                                                                                        • OtomotO 7 months ago
                                                                                          No bootcamp, university, albeit only a BSc, because I didn't feel like academia afterwards with a full time job and now I've moved on.

                                                                                          9 years of professional experience.

                                                                                          Having worked and paid to do so with Java, Scala, Kotlin, Python, JavaScript, Typescript, Python

                                                                                          Been working with Rust since 2015, have prior experience with C++, had to work with C, Haskell and logic programming (not prolog) at University.

                                                                                          Also did C#, Golang, Lua, Zig and many more.

                                                                                          Does that give more authority to my statement? I sincerely hope not!

                                                                                        • johnfn 7 months ago
                                                                                          Why is this attitude so pervasive? It's akin to writing backend and saying you should avoid Postgres altogether and use text files saved on the hard disk.
                                                                                          • dmix 7 months ago
                                                                                            For one big reason that complex JS interfaces in the browser aren't needed nearly as much as they are used. Probably only about 10% of the time people reach for React. While databases solve a predictable problem (up to a certain scale).

                                                                                            FE tooling is never a one-size fits all thing like Postgres, but people want it to be (god help you if you have 2 different FE libraries that serve different usecases, even though 90% of the time you just need simple tooltips or a multi-select box that play nice with static server HTML) and the cost is giant, unmanageable, extremely expensive piles of JS where the entire frontend is pushed inside of it.

                                                                                            • aylmao 7 months ago
                                                                                              I have 3 complementing theories:

                                                                                              1. Beyond self-learning, there's two types of education. Formal, college education that delves deep to both the CPU level and mathematical proofs of correctness, and coding bootcamps which teach how to do things, but little about how things work.

                                                                                              Frontend isn't taught in formal college education, so there's a big void in industry knowledge. Some people learn about compilers, interpreters, have used GDB and implemented malloc for school, but they aren't the ones doing frontend. Others are doing frontend but never think about memory usage, closure scopes, or garbage collection.

                                                                                              This leads to bad frontend code, that misuses resources.

                                                                                              2. JavaScript long had fame for being a "toy" or "joke" language. I noticed the tide slowly change by the mid 2010s— that's not that long ago.

                                                                                              Proportionally and compared to other technologies, how many engineers have had time to develop long careers, learn from mistakes, and become that serious, dress-shirt wearing, super-senior engineer sitting at the back of the room making sure young developers don't get too unhinged? This proportion is probably especially stark if you consider just how in-demand web development is.

                                                                                              This leads to bad frontend code, that misuses resources.

                                                                                              3. Finally, with the two above in mind, re-writes. Unexperienced teams are the first to opt for re-writes. It's a story as old as time; "we don't know how to fix A, so let's instead build a brand new thing B, which works differently to A and thus won't have its problems".

                                                                                              Re-writes always go well at first, because the fresh codebase will be smaller, faster, nicer and because everyone is especially cognisant of the problems A had, which are very much not present in B since it works differently.

                                                                                              Eventually of course, B grows bigger, and gets permanent hot-fixes, its requirements change, and bugs start to surface that nobody bothers understanding. A is also far enough in the past that nobody is thing about the problems A had anymore, and has more mind-space to notice the problems that are unique to B.

                                                                                              But before that happens, you get this sort of comments.

                                                                                              • mlboss 7 months ago
                                                                                                Sql syntax does not change every month
                                                                                                • phist_mcgee 7 months ago
                                                                                                  For whatever reason, backend devs can be incredibly precious about their tech stack and rightly or wrongly believe that frontend devs make "silly" choices by not using their preferred stack.

                                                                                                  It's a form of technical smugness that pervades this site for any frontend JS thread.

                                                                                                  You rarely see frontend devs criticise backend devs on their tech stack.

                                                                                                  • OtomotO 7 months ago
                                                                                                    If postgres were worse than the alternatives I wouldn't use it.

                                                                                                    And React is worse than the alternatives. All it has going for it is the huge ecosystem.

                                                                                                    • mollerhoj 7 months ago
                                                                                                      How are these two scenarios comparable?
                                                                                                      • gassiss 7 months ago
                                                                                                        indeed you should avoid postgres if all you need is saving files on a disk. that's exactly the point. people reach for complex client side frameworks when all they need is to render some markup.
                                                                                                      • ramses0 7 months ago
                                                                                                        I've avoided React as much as possible. Dabbled (positive experiences) with Vue. What's your recommendation w.r.t. "Components"? I've tried doing web-components from scratch (frameworkless) but nested web components have nasty gotchas.

                                                                                                        eg: <todo-list><%for...><todo-item .../></for%></todo-list>

                                                                                                        I've poked at `lit`, read through `htmx`, but really what I want is "custom elements" (including visual styling) on the front-end that I can map back to JSON on the backend.

                                                                                                        The CSS side nudges towards tailwind (or similar), and modern (raw) CSS has undergone so many feature extensions and new capabilities, it's tough to find a good "modern" guide for building with it.

                                                                                                        It just feels like there's a missing piece in-between: `let contact = new LdapContact(...)` and `<contact-summary .../> ; <contact-detail .../> ; <contact-search-result .../>`.

                                                                                                        Vue has come closest, and setting aside a super-complicated "WebApp/SPA" with a ton of interactivity... what's a comfortable, modern, low-ceremony way to get to that?

                                                                                                        • WuxiFingerHold 7 months ago
                                                                                                          > If you need to do CSR, use Solid or Vue, but don't do React.

                                                                                                          Easier said than done.

                                                                                                          There're still many high quality libs for React that are not available for vanilla JS or other frameworks. E.g. https://reactflow.dev/ (yes, they have a Svelte version, but not as feature rich).

                                                                                                          Vue comes very close, though.

                                                                                                          • klaussilveira 7 months ago
                                                                                                            Still no good component or UI libraries for HTMX.
                                                                                                            • clivestaples 7 months ago
                                                                                                              This is the sticking point for me. I get so many gains in Rails but I quickly sink into time-consuming component research/building. My eyes are always open for HTML/JS component libraries along the lines of react-aria.
                                                                                                              • mlboss 7 months ago
                                                                                                                That is exactly the point of HTMX. Use your backend stack and sprinkle some hx tags.
                                                                                                                • xigurat 7 months ago
                                                                                                                  Probably there will never be, that's like saying "Still no good component or UI libraries for HTML".

                                                                                                                  HTMX philosophy is to be timeless and agnostic as HTML is, is just a nice extension on top.

                                                                                                                  • alexpetros 7 months ago
                                                                                                                    Anything that can be loaded as a stylesheet or a script tag works great with htmx. These are not htmx-branded libraries... because they're just web libraries.
                                                                                                                    • nox101 7 months ago
                                                                                                                      Can webcomponents be trivially used with HTMX?

                                                                                                                      Like for example: https://shoelace.style/

                                                                                                                      • Weetile 7 months ago
                                                                                                                        I've had a great experience using Golang + HTMX + DaisyUI using the tailwind-cli-extra standalone tool, negating the requirement for npm at all.
                                                                                                                      • wslh 7 months ago
                                                                                                                        Is discussing React vs. HTMX like comparing apples to oranges?
                                                                                                                        • keb_ 7 months ago
                                                                                                                          Yes. Something HTMX evangelists always forget to mention is that HTMX is not a replacement for React -- HTMX + a backend is. This introduces a whole new layer of complexity; it's a total tradeoff. That is to say there are probably React apps that would be better as HTMX apps.
                                                                                                                          • math_dandy 7 months ago
                                                                                                                            Correct. HTMX doesn’t deal with client-side state and updating UI in response to client-side interactions. React, on the other hand, is all about that stuff.
                                                                                                                            • recursive 7 months ago
                                                                                                                              Maybe, but it may be reasonable to do that sometimes. What fruit should we bring to the picnic?
                                                                                                                            • audessuscest 7 months ago
                                                                                                                              HTMX is certainly easier, but it's the worse if you want to actually learn FE
                                                                                                                              • akdor1154 7 months ago
                                                                                                                                Strong disagree, it would be a great way to learn vanilla html/CSS/js without kneecapping yourself.
                                                                                                                                • runako 7 months ago
                                                                                                                                  Couldn't one say the same thing about using any framework that provides capabilities that otherwise would have to be learned?
                                                                                                                                  • digdugdirk 7 months ago
                                                                                                                                    As someone who isn't a web developer, what do you mean by that?
                                                                                                                                    • baq 7 months ago
                                                                                                                                      Not sure how to interpret what you're saying.

                                                                                                                                      HTMX allows you to learn the very basics: the HTML which is almost verbatim turned into DOM which the browser renders. It's the FE. Everything else is layers upon layers of abstraction which ultimately compile down to the DOM representation of HTML.

                                                                                                                                      ...or to put it differently, quoting HTMX's author: using HTTP to transfer HTML? How queer!

                                                                                                                                    • recroad 7 months ago
                                                                                                                                      React/NextJS user here. I can easily make a case that you should avoid HTMX and go with Elixir LiveView because it’s sooooooo incredibly much better. What you’re not understanding is that “better” is contextual.
                                                                                                                                      • jeswin 7 months ago
                                                                                                                                        > My tip: you start by avoiding React altogether.

                                                                                                                                        Avoiding the most popular front-end tech (or any tech) is a good tip for those who want to play Finding a Job in hard mode.

                                                                                                                                        • bdangubic 7 months ago
                                                                                                                                          on a flip side, you have an opening for a high 6-figure front end position with an amazing team doing amazing shit - and you see CVs of “React Developers” and you go “uf tough luck, these gals/guys would be PERFECT here except of course we don’t use React” (speaking from personal experiences…)
                                                                                                                                        • MarcelOlsz 7 months ago
                                                                                                                                          Just use Vue lol.
                                                                                                                                        • rdsubhas 7 months ago
                                                                                                                                          In my experience, React was an interesting take, but it had certain flawed red-flags that were ignored from the start. I wrote posts about it, but was doomed as a skeptic. The original fundamental premise: let's do one-way binding with virtual DOM, re-render, diff – did not make fundamental sense. Double the memory in browser, complete re-render & diff for every interaction? The answer was: Make it reliable, then make it fast. Now, it's full of hacked-up constructs attempting to make it fast – but it's neither fast nor reliable. At least with honest two-way binding frameworks, fast is guaranteed, and reliability comes from my experience. With React it's just a mess. I pity all the frontend engineers who's first intro has been with React, because unlearning is much more difficult than learning.

                                                                                                                                          Being mindful of the never-ending-nirvana frontend spirit of churn, and after doing web development in VBScript, JS, JQuery, Mootools, Applets, Actionscript, YUI/Ext/Sencha, Backbone, Knockout, Angular1, Angular2, React, Vue1 – I'd say try Flutter. It's genuinely a breath of fresh air.

                                                                                                                                          Except... Dart. If only Flutter was in Typescript it might have been a bit closer to nirvana. The Dart part is still keeping the frontend spirit of churn alive.

                                                                                                                                          • homebrewer 7 months ago
                                                                                                                                            What are y'all doing with it that apparently makes it slow? I've been developing a massive react application for the past two years, and it's plenty fast and very responsive even on my mid-2019 middle of the range Android phone. And I'm saying that as someone who refuses to use Electron and trims down Linux desktops to bare essentials to save as much memory and CPU cycles as possible.

                                                                                                                                            It's an interactive business analytics, one of those use cases where an SPA makes sense — 15 years ago it would have been a native desktop application.

                                                                                                                                            We just follow the usual guidelines, no extraordinary optimization techniques or anything like that.

                                                                                                                                            • subarctic 7 months ago
                                                                                                                                              Have you don't nothing to optimize it? One pattern we've had to adopt is wrapping every component in react.memo
                                                                                                                                            • simplify 7 months ago
                                                                                                                                              Virtual DOM is not inherently an issue. Many libraries use it and are much faster than React.

                                                                                                                                              The main issue is React forces you to tell it which components to re-render. This causes a bloat of ceremony that makes it endlessly annoying (in comparison to global redraws) to write in.

                                                                                                                                              • lyu07282 7 months ago
                                                                                                                                                > React forces you to tell it which components to re-render

                                                                                                                                                That's a really weird statement, do you keep your application state in a mutable data structure instead of immutable? Do you know what a pure component is?

                                                                                                                                              • kesslern 7 months ago
                                                                                                                                                Why is fast guaranteed with two way binding frameworks?
                                                                                                                                              • markandrewj 7 months ago
                                                                                                                                                I generally feel the opposite way. React was changing every few weeks when I started using it, the docs and API are much more stable and consistent now. In general web standards are more stable then ever also. People younger then myself won't have learn 100s of layout hacks to get their pages displaying properly cross browser, or sometimes even in just one browser. This is just my perspective, although I also understand JavaScript fatigue, I feel it is actually one of the best times to start learning.
                                                                                                                                                • RandomThoughts3 7 months ago
                                                                                                                                                  > I feel sorry though for someone getting into frontend dev now.

                                                                                                                                                  I most certainly don’t.

                                                                                                                                                  As someone who has mostly done low level coding and used to generally dislike my few interactions with web frontend development, I was extremely surprised when I picked up React a few years ago for a personal project.

                                                                                                                                                  The whole thing feels like actual proper development. What a breath of fresh air compared to the situation before.

                                                                                                                                                  • typeofhuman 7 months ago
                                                                                                                                                    > personal project

                                                                                                                                                    In professional projects with teams of developers contributing and PMs wanting feature flags, tracing, complex behavioral logic, it gets crazy.

                                                                                                                                                    • yazaddaruvala 7 months ago
                                                                                                                                                      I’d say even more so for professional projects you’re better off with React.

                                                                                                                                                      Been there and done that with and without. Junior (and Senior) devs fundamentally don’t read the docs. That and requirements churn are the problems.

                                                                                                                                                      Given that, it ends up so much better with React.

                                                                                                                                                    • ChrisRR 7 months ago
                                                                                                                                                      How did you learn? I'm an embedded dev and when I tried to learn basic web dev, all the resources were a mess of importing unnecessary libraries
                                                                                                                                                      • RandomThoughts3 7 months ago
                                                                                                                                                        With the official doc. The react doc is well written. You have a quick start section, a good tutorial and the API is fully covered.
                                                                                                                                                    • thorum 7 months ago
                                                                                                                                                      > I’m pretty sure it’s a cool feature but, what a mouthful. Imagine you decided to start developing websites today, how do you even start?

                                                                                                                                                      Easy: By not using that optional feature.

                                                                                                                                                      If you’re like 99% of developers you really don’t need stuff like that until your app reaches a certain stage of growth, if ever - and React doesn’t force it on you.

                                                                                                                                                      • aylmao 7 months ago
                                                                                                                                                        Huge +1 to this. Looking at python 3.13 release notes [1]:

                                                                                                                                                        > asyncio.as_completed() now returns an object that is both an asynchronous iterator and a plain iterator of awaitables. The awaitables yielded by asynchronous iteration include original task or future objects that were passed in, making it easier to associate results with the tasks being completed. (Contributed by Justin Arthur in gh-77714.)

                                                                                                                                                        "I’m pretty sure it’s a cool feature but, what a mouthful. Imagine you decided to start developing python scripts today, how do you even start?"

                                                                                                                                                        [1] https://docs.python.org/3/whatsnew/3.13.html#asyncio

                                                                                                                                                        • kovrik 7 months ago
                                                                                                                                                          Not sure if those are the same though?

                                                                                                                                                          Async, await, iterators, futures etc. are pretty much standard constructs in almost all programming languages / concurrency frameworks.

                                                                                                                                                          Whereas Actions, Transitions, Pending State, Reducers etc. are React-specific idiosyncrasies.

                                                                                                                                                          I guess that's the main issue people have with React, when you learn it you have to spend so much time to learn all these React-specific constructs and idiosyncrasies that are not transferable anywhere else.

                                                                                                                                                        • yawaramin 7 months ago
                                                                                                                                                          Yeah, but if you're like 95% of developers you really don't need React either, but 'something' forces it on you.
                                                                                                                                                        • klaussilveira 7 months ago
                                                                                                                                                          It's hard not to use Next.js and React due to the insane amount of building blocks to built on top of. Not to mention design libraries and component libraries, such as Radix and shadcn. If you don't have the design skills, or the time, nothing beats that.

                                                                                                                                                          Have you tried using v0 to generate a layout and a barebones application? It saves so much time. No more hunting for templates/themes, no more mocking.

                                                                                                                                                          • hi_hi 7 months ago
                                                                                                                                                            I went down this path very recently as a React newbie, for the exact reasons you stated. It looked like I'd be able to save a bunch of time, and I'm sure I did.

                                                                                                                                                            But I also _spent_ a bunch of time as soon as I needed something slightly different to OOTB (or sometimes just wanted to understand how a thing worked better). At that point I ended up digging through Radix code, React library documentation where there were frequently multiple ways of doing the same thing and I had no idea which was "best". I had to delve into some of the more complex (to me, as a newbie) patterns like forwardRef. And this was all for a very trivial site/app that needed some form interactions.

                                                                                                                                                            My takeaway at the end was, I'd learnt a bunch of new stuff, which was the point, but that was all workarounds for dealing with the complexities introduced by the tools which were meant to simplyfy my life.

                                                                                                                                                            Perhaps for large projects with multiple devs, they bring efficiencies of scale. I think for my next solo project I'm trying Rails or Django with htmx.

                                                                                                                                                            • klaussilveira 7 months ago
                                                                                                                                                              I understand that sentiment, although in an opposite away: for large projects with multiple devs, I'd prefer something like Rails or Django, precisely because they are battle-tested with a lot of official documentation. Things are done in one specific way and the team can just agree to whatever the framework recommends. And there are clear guidelines for pretty much everything.

                                                                                                                                                              However, in solo projects, I want to spin something up quickly. I don't want to spend my scarce weekend time designing yet another date time picker. Or having to write hackish CSS to try and make whatever time picker library I chose to match the CSS of Bootstrap. And then everything falls apart because some other library does not fit into the overall style (looking at you DataTables). In React land, I don't have to worry about this. I just throw components together, link it to my API where the show real is, and call it a day.

                                                                                                                                                              UIs are just UIs. They should be plug and play. So much time is wasted redesining data grids and data tables and pickers and filters for the 1000th time.

                                                                                                                                                          • dcre 7 months ago
                                                                                                                                                            I don’t think beginners are beginning by reading the release notes. Note that the wonderful learning guide doesn’t even discuss these advanced hooks.

                                                                                                                                                            https://react.dev/learn

                                                                                                                                                            Even the reference section of the site makes clear how far down the priority list the advanced hooks are.

                                                                                                                                                            https://react.dev/reference/react/hooks

                                                                                                                                                            • vouaobrasil 7 months ago
                                                                                                                                                              I love website design for personal projects, but it is the least attractive of all development fields due to this complexity. I'm sure some people like it, but I found website dev a lot more fun 20 years ago...
                                                                                                                                                              • codr7 7 months ago
                                                                                                                                                                Same with backend dev imho.
                                                                                                                                                                • codr7 7 months ago
                                                                                                                                                                  What? You don't agree, or are you angry at me for reminding you?
                                                                                                                                                              • mattgreenrocks 7 months ago
                                                                                                                                                                It's insane that the total complexity of the ecosystem has only grown in the past decade, despite the amount of time and tools trying to contain it. I have a hard time seeing that expectations rose accordingly alongside this. I'm half-convinced it is tolerated as a collective subconscious gatekeeping/total employment mechanism.

                                                                                                                                                                My response has been to avoid SPAs as much as possible. YAGNI! Just use boring forms and server responses. Some component libraries can be server-rendered, minimizing the JS payload while giving you some primitives to build off of. Components are a really nice abstraction even in a pure server context. You can contain the goopy Tailwind code a bit.

                                                                                                                                                                It's not all bad. Astro seems pretty nice so far!

                                                                                                                                                                • lmm 7 months ago
                                                                                                                                                                  The HN hate boner for React is unreal. They've added a new hook to allow you to provide a more optimized implementation for a particular special case. It sounds like it's in the obvious place to find it if you need it, and does what you would want it to do. Why would you care about this unless you needed it? And if you needed it you'd know what it does.
                                                                                                                                                                  • reshlo 7 months ago
                                                                                                                                                                    > And if you needed it you’d know what it does.

                                                                                                                                                                    Why would that be true? Often people don’t know what they need to solve a particular problem.

                                                                                                                                                                    • lmm 7 months ago
                                                                                                                                                                      I meant the description quoted is the right description for someone who needs this to understand.
                                                                                                                                                                  • meme3 7 months ago
                                                                                                                                                                    > Imagine you decided to start developing websites today, how do you even start?

                                                                                                                                                                    You learn vanilla HTML/CSS/JS (I think Mozilla has good courses on those). After making a few websites that way, you learn Svelte and you live happily ever after.

                                                                                                                                                                    Avoid React, NextJS at all cost especially since many of these new frameworks actively try to screw over new developers with PaaS.

                                                                                                                                                                    • billti 7 months ago
                                                                                                                                                                      It's funny to think back now that JSX had such a strong negative reaction on launch. That's the one thing from React I love - having a declarative and strongly typed markup for HTML in my JS/TS code.

                                                                                                                                                                      I think React peaked with hooks around 2019. I write most of my front-end with the smallest 'React-like' library possible (Preact) using only functional components, and with as little 'magic' from useEffect etc. as possible.

                                                                                                                                                                      I like to stay close to 'raw' HTML/CSS/JS when possible, but the web platform APIs are just a little to clunky and verbose for me without the JSX abstraction.

                                                                                                                                                                    • can16358p 7 months ago
                                                                                                                                                                      I get NextJS but how does React itself try to screw devs with PaaS?
                                                                                                                                                                      • mhnthrow 7 months ago
                                                                                                                                                                        The Getting Started docs recommend against using vanilla React and nudge you towards NextJS and similar frameworks because you're gonna end up needing that stuff eventually https://react.dev/learn/start-a-new-react-project

                                                                                                                                                                        So new projects have to actively not follow the recommended approach in the docs if they want to use vanilla React.

                                                                                                                                                                      • exceptione 7 months ago
                                                                                                                                                                        I learn Svelte has a template language.
                                                                                                                                                                        • norman784 7 months ago
                                                                                                                                                                          It is not very different from mustache, or other older template engines and it's really needed because there is no conditional html rendering, loops etc in the HTML spec itself, I like that more than how Vue does.

                                                                                                                                                                          But otherwise, Svelte has a very low surface, everything else is just standard vanilla JS/Html, also one thing that Svelte has over other frameworks is that vanilla JS libraries just work, no need for a wrapper any.

                                                                                                                                                                      • deadbabe 7 months ago
                                                                                                                                                                        Just start.

                                                                                                                                                                        I don’t get how people get so paralyzed of making the most optimal decisions all the time that they end up doing nothing or procrastinating by convincing themselves they need to learn some other basic framework instead.

                                                                                                                                                                        • jfengel 7 months ago
                                                                                                                                                                          It helps to know that the basic tutorials still apply. You don't need these advanced features. Certainly not for basic projects, and possibly not ever. After all, people successfully wrote React apps without it.

                                                                                                                                                                          One mark of a framework with a future is that it supports its past. A framework with a lot of breaking changes is one that is not mature, and may never be mature.

                                                                                                                                                                          Even with the substantial shift in React from classes to functions and hooks, old code still works. You probably don't want to start writing class-based React, so you want a tutorial written in the last 5 years, but those are hardly new and certainly not specific to React 19.

                                                                                                                                                                          • trgn 7 months ago
                                                                                                                                                                            hooks was the beginning of the end imho. it replaced nicely encapsulated OO, with unmaintainable functional cruft. runtime footprint of react has vastly increased, and code has gotten harder to debug.
                                                                                                                                                                          • rglullis 7 months ago
                                                                                                                                                                            When I wanted to make a SPA for a project, I also wanted to avoid analysis paralysis. So I looked at Vue and React.

                                                                                                                                                                            Getting started with Vue was so much easier, I never looked back to React.

                                                                                                                                                                            • deadbabe 7 months ago
                                                                                                                                                                              Do you ever wonder about the road not taken?
                                                                                                                                                                          • o_m 7 months ago
                                                                                                                                                                            The attitude I've heard from many frontend devs is that they acknowledge that AI will do most of the work. v0 and Bolt will do most of the work. Not because it does a better job, but because there will be a race to the bottom where employers don't want to pay for anything else. So this might mainly be a problem for the AI to learn.
                                                                                                                                                                            • ChrisRR 7 months ago
                                                                                                                                                                              > Imagine you decided to start developing websites today, how do you even start

                                                                                                                                                                              I'm an embedded dev so I've so far removed from web dev, but recently started looking into learning web dev for some personal projects. My god what a mess.

                                                                                                                                                                              Any learning resource for a single topic , like javascript, Flask, CSS can't seem to stick to what it's trying to teach and insist that you start importing other libraries and frameworks. Most of the time they're not needed and the author just assumes that you understand this other library in order to continue following their examples

                                                                                                                                                                              So you google how to use that library, but the learning resources assume knowledge of a different library...

                                                                                                                                                                              When all the resources of just plain javascript and plain HTML/CSS. I don't want bootstrap or react, I just want to learn the fundamentals to build upon

                                                                                                                                                                              • brundolf 7 months ago
                                                                                                                                                                                React has a dizzying number of concepts now. I don't love the direction it's taken the past few years; it used to be a really minimal and elegant core, but these days it's hard to keep up with all the abstractions
                                                                                                                                                                                • vundercind 7 months ago
                                                                                                                                                                                  I liked redux, but its vocabulary was the last thing core React should have adopted from it.
                                                                                                                                                                                  • acemarke 7 months ago
                                                                                                                                                                                    I maintain Redux, and I don't think Redux inspired this particular term usage (which came from the "Flux Architecture" pattern.)

                                                                                                                                                                                    As far as I know this usage ultimately derives from HTML `<form action={}>`.

                                                                                                                                                                                    • vundercind 7 months ago
                                                                                                                                                                                      Ah, different “action”, then? The presence of “reducer” had me assuming the action was also analogous.

                                                                                                                                                                                      FWIW I liked Redux enough that I once half-reimplemented it for Brightscript so the UI guys would have something familiar to work with when they had to touch Roku apps. I always taught Redux initially using different terminology, though, because I found that most of my time learning it (which, mercifully, still wasn’t that long, because it’s small and pretty sensible) was figuring out the vocabulary (“do… do they just mean ‘event’? Well if so surely they’d write ‘event’, so I must be wrong…”)

                                                                                                                                                                                    • skiabox 6 months ago
                                                                                                                                                                                      Redux is the most over-engineered invention/perception in the history of software development.
                                                                                                                                                                                    • notapenny 7 months ago
                                                                                                                                                                                      > Imagine you decided to start developing websites today, how do you even start?

                                                                                                                                                                                      With HTML and CSS. And you don't touch JS until you understand the fundamentals of those. And only after those three do you touch a FE framework.

                                                                                                                                                                                      I'm not even kidding either. Whether its React, Angular or any back-end driven templating, those things are all abstractions over fundamentals.

                                                                                                                                                                                      • Taylor_OD 7 months ago
                                                                                                                                                                                        > Imagine you decided to start developing websites today, how do you even start?

                                                                                                                                                                                        You'd slap together a Jenkins/Jekyll site and host it on github for free. It's easier now to set up a website than ever. But yeah that React sentence is pretty difficult to gronk.

                                                                                                                                                                                        • Cthulhu_ 7 months ago
                                                                                                                                                                                          I'm trying to parse that sentence and as it turns out... probably nothing is relevant to me that just writes end user front-end stuff. Most React development is in the backend / rendering or for specialists that write libraries, feels like.
                                                                                                                                                                                          • zild3d 7 months ago
                                                                                                                                                                                            > I’m pretty sure it’s a cool feature but, what a mouthful. Imagine you decided to start developing websites today, how do you even start?

                                                                                                                                                                                            You start where the docs say to start, https://react.dev/learn which wouldn't be mentioning this advanced feature, just like pretty much any tech. Reading postgres, python, etc release notes will have a bunch of scary sounding new features to a beginner, but those won't be making their way into the "Get started" section

                                                                                                                                                                                            • rglover 7 months ago
                                                                                                                                                                                              Shameless self-promotion, but anyone reading this who is just getting into front-end and doesn't want to deal with that ^, check out Joystick [1].

                                                                                                                                                                                              It's a full-stack JS framework with its own components library that uses plain HTML, CSS, and JS (and has dead-simple, obvious APIs for implementing more advanced logic like state and event handlers). It's a logical next step from learning web dev fundamentals to building full apps.

                                                                                                                                                                                              [1] https://cheatcode.co/joystick

                                                                                                                                                                                              • chrismorgan 7 months ago
                                                                                                                                                                                                Judging by your front page demo, your component stack is built on simple string concatenation (via untagged template strings), with nothing about escaping of any form, for any format. That's a very bad sign, you're just begging for injection attacks. There's absolutely no chance of me using a framework with a demo like that, even if it actually had decent tools for handling the situation.
                                                                                                                                                                                                • rglover 7 months ago
                                                                                                                                                                                                  That's all mitigated on the server. You also have access to additional escaping tools for handling user-generated data on the server, too.
                                                                                                                                                                                                • Eric_WVGG 7 months ago
                                                                                                                                                                                                  port 2600 huh ;)
                                                                                                                                                                                                  • rglover 7 months ago
                                                                                                                                                                                                    Yes! You're the first person to catch that. Check out the test port.
                                                                                                                                                                                                • anonzzzies 7 months ago
                                                                                                                                                                                                  I read the updates and I know we will never need this stuff and we will never use it. However, we cannot not update to it for the clients that use it as other libraries will start using it. It is why we left react; this churn is just mental for things that have no value to most dev users. Even if it has potential value, many will just skip it as so many things from previous versions are not used in many codebases we see (and we see a lot in different large corp repositories).
                                                                                                                                                                                                  • azangru 7 months ago
                                                                                                                                                                                                    > Imagine you decided to start developing websites today, how do you even start?

                                                                                                                                                                                                    Not with React?

                                                                                                                                                                                                    Seriously, if you are starting developing websites today, the first thing you need to do is learn the web platform: html, css, javascript (probably typescript as well while you are at it), svg; and some basic server-side stuff. React is for when you get pretty comfy with those.

                                                                                                                                                                                                    • ww520 7 months ago
                                                                                                                                                                                                      Why is state management so complicate in React?
                                                                                                                                                                                                      • CharlieDigital 7 months ago
                                                                                                                                                                                                        React is the only major FE lib/framework that basically re-renders each (affected) component and sub-tree on update cycles.

                                                                                                                                                                                                        The model they've chosen is the opposite of what one would intuit and because of this model, it is necessary to manage state a bit differently in React compared to Vue or Svelte.

                                                                                                                                                                                                        • WesleyJohnson 7 months ago
                                                                                                                                                                                                          I, for one, would intuit that exact process flow. If my UI is a function of my state, I expect state changes to re-render my UI. How else would you handle it, except for imperatively?

                                                                                                                                                                                                          This is genuine question; I've not used Vue or Svelte.

                                                                                                                                                                                                        • robertoandred 7 months ago
                                                                                                                                                                                                          It’s not.
                                                                                                                                                                                                        • iterateoften 7 months ago
                                                                                                                                                                                                          The rest of react still works. It’s not like it’s a primary entry point or required. Looks like an advanced feature.
                                                                                                                                                                                                          • SkyMarshal 7 months ago
                                                                                                                                                                                                            > Imagine you decided to start developing websites today, how do you even start?

                                                                                                                                                                                                            Probably with something simpler like Alpine.js, or even JQuery. No beginner is going to be building the kind of web app that requires such a heavyweight framework like React. Don't bother with it until you know you need it.

                                                                                                                                                                                                            • johannes1234321 7 months ago
                                                                                                                                                                                                              Reading changelogs certainly isn't the right place to start learning. A changelogs is a quite condensed view on changes from an implementation point of view. Some projects are good in promoting highlights from user perspective, but still a tutorial and manual are better places to start.
                                                                                                                                                                                                              • mu53 7 months ago
                                                                                                                                                                                                                I think its all tech jobs at this point. People used to be a good sysadmin with just some bash, but now there are so many complex frameworks and best practices.

                                                                                                                                                                                                                The quality expected of apps over the last 20 years has skyrocketed, and the tools to handle those requirements have gotten increasingly complex.

                                                                                                                                                                                                                • nailer 7 months ago
                                                                                                                                                                                                                  I'd hoped this release would have added a compiler and drastically simplified the syntax to something close to a modern framework. I know React is eventually going to do that, but it feels like React has been drowning in overly complex DX for at least the last 5 years.
                                                                                                                                                                                                                  • acemarke 7 months ago
                                                                                                                                                                                                                    The React Compiler is currently in beta:

                                                                                                                                                                                                                    https://react.dev/blog/2024/10/21/react-compiler-beta-releas...

                                                                                                                                                                                                                    That said, it doesn't change the APIs included in React itself, or the overall usage patterns. Ultimately it rewrites your component code to add a lot of conditional comparisons to see if props or state values changed, and uses that to trigger React's existing rendering optimization behaviors.

                                                                                                                                                                                                                    Long-term, I expect that the React Compiler _will_ result in a significant change in the DX for using React. React's default behavior has always been "re-render recursively regardless of props changes" [0], but people often assume it's "only re-render the child if the props changed". React Compiler actually makes flips React's default behavior to make that a reality.

                                                                                                                                                                                                                    [0] https://blog.isquaredsoftware.com/2020/05/blogged-answers-a-...

                                                                                                                                                                                                                  • umvi 7 months ago
                                                                                                                                                                                                                    Yeah I'm getting kubernetes vibes from all the abstractions mentioned in a single sentence. I'm sure the abstractions are needed and/or powerful to accomplish React's goals, but it's just a bunch of extra stuff added to the learning curve which makes it harder for outsiders to understand and contribute to the code.
                                                                                                                                                                                                                    • pjmlp 7 months ago
                                                                                                                                                                                                                      My main approach, when it is something I control, I stay as much on .NET and Java solutions for Web development, with minimal JavaScript.

                                                                                                                                                                                                                      When not, I focus on backend and devops instead.

                                                                                                                                                                                                                      Although some SaaS products make our life harder, with React only SDKs.

                                                                                                                                                                                                                      • lukebuehler 7 months ago
                                                                                                                                                                                                                        It’s not that bad. I started basically from zero about a year ago, have been doing react maybe 20% of my work time since then, and I would say I now understand and can use most concepts/features in react.
                                                                                                                                                                                                                        • pier25 7 months ago
                                                                                                                                                                                                                          > I feel sorry though for someone getting into frontend dev now.

                                                                                                                                                                                                                          Yeah. For the last decade or so frontend has felt like standing on shifting sands.

                                                                                                                                                                                                                          In part it's the ecosystem and entangled deps but also because JS frameworks are really still figuring it out. A couple of years ago I was hoping we'd reach some sort of stable plateau but it just keeps going...

                                                                                                                                                                                                                          "the DOM is slow we need a VDOM!"

                                                                                                                                                                                                                          "the VDOM wasn't such a good idea... signals with fine-grained reactivity is really the solution for DOM udpates!"

                                                                                                                                                                                                                          "oh wait but we now need a compiler!"

                                                                                                                                                                                                                          "oh wait there's too much JS now... we better move stuff to the server and do SSR with full page hydration!"

                                                                                                                                                                                                                          "maybe full page hydration wasn't such a good idea... we now need islands!"

                                                                                                                                                                                                                          Etc.

                                                                                                                                                                                                                          Don't get me wrong, each of these steps makes total sense. But we're getting into this uber complex solution that involves so much stuff across the whole stack... and it's not even clear to me that running JS in our servers was such a good idea to begin with.

                                                                                                                                                                                                                          • threatofrain 7 months ago
                                                                                                                                                                                                                            SSR was essential and the motivation was stuff like SEO. For people who care that was uncompromisable. For people who only care about SPA the conversation has been frozen for almost a decade; almost all the innovative fury has been on the SSR/MPA/hybrid side.
                                                                                                                                                                                                                            • pier25 7 months ago
                                                                                                                                                                                                                              > For people who only care about SPA the conversation has been frozen for almost a decade

                                                                                                                                                                                                                              I don't know, there's been a lot of stuff since 2014.

                                                                                                                                                                                                                              In client-side React we've seen stuff like react-query, mobx, etc which weren't there a decade ago. Back in 2014 everyone was still using redux (ugh).

                                                                                                                                                                                                                              Or Svelte and SolidJS which have brought massive improvements in performance and reducing JS with signals, compiler, etc.

                                                                                                                                                                                                                            • jazzyjackson 7 months ago
                                                                                                                                                                                                                              "screw it, lets compile it into a WASM blob that renders it all on a canvas"
                                                                                                                                                                                                                              • TimTheTinker 7 months ago
                                                                                                                                                                                                                                Seriously, I think there is a possible future where a macOS-like reactive UI toolkit is developed that compiles and deploys to the web via WASM. Maybe even a compiler that takes something like Xcode's Interface Builder's .nib files (and associated code). Microsoft tried something like that with Blazor WebAssembly. It works really well, but I think a fully data-reactive model like Apple's could be even more successful when applied to web apps.

                                                                                                                                                                                                                                Whatever the case, I think very few companies have reached the excellence of native macOS interface design in the context of a web app. Figma is a lone exception; for anyone else to achieve what they have, they'd have to reinvent the wheel yet again in so many small ways. (Have you noticed in Figma how moving the mouse down and to the right diagonally from a menu item to its associated submenu does not cause the menu item and submenu to be deselected? That detail, and so many others, are straight-up macOS-inspired UI craftsmanship.)

                                                                                                                                                                                                                                We need a reusable toolkit that lets ordinary developers achieve Figma-level UI excellence in web apps.

                                                                                                                                                                                                                                • eddd-ddde 7 months ago
                                                                                                                                                                                                                                  That'd be unironically simpler than the current state of things.
                                                                                                                                                                                                                                  • Muromec 7 months ago
                                                                                                                                                                                                                                    A11y enters the chat with their buddy "compliance"
                                                                                                                                                                                                                                • paxys 7 months ago
                                                                                                                                                                                                                                  By that logic beginners can never get into programming (or really any other field) because there's some complexity on the deep end.
                                                                                                                                                                                                                                  • Stevvo 7 months ago
                                                                                                                                                                                                                                    "My criticism is more FE development in general not just React"

                                                                                                                                                                                                                                    No, it is not. Your criticism is very specific to React.

                                                                                                                                                                                                                                    • sergiomattei 7 months ago
                                                                                                                                                                                                                                      Why would a web dev learner need to know about this feature?
                                                                                                                                                                                                                                      • shams93 7 months ago
                                                                                                                                                                                                                                        htmx and python
                                                                                                                                                                                                                                        • orliesaurus 7 months ago
                                                                                                                                                                                                                                          Maybe not with react
                                                                                                                                                                                                                                          • soulofmischief 7 months ago
                                                                                                                                                                                                                                            Just use mithril and never look back. You can learn the API in one day and move on with your life creating compact and performant apps.

                                                                                                                                                                                                                                            React is unbelievably overengineered, classic case of creating solutions to self-invented problems.

                                                                                                                                                                                                                                          • EternalFury 7 months ago
                                                                                                                                                                                                                                            Nothing new to what I am going to say and not strictly related to React 19.

                                                                                                                                                                                                                                            I once loved client-side frameworks like React.

                                                                                                                                                                                                                                            Then I realized: Great, we managed to add complexity wherever possible. In the backend, in the front-end, in the DevOps stack, EVERYWHERE. And more layers will be introduced to keep all that distributed complexity in sync.

                                                                                                                                                                                                                                            sigh

                                                                                                                                                                                                                                            • norswap 7 months ago
                                                                                                                                                                                                                                              Frontend frameworks really do make things simpler once you go beyond small applications though. Automatically re-rendering when the data/model changes is the right thing to do.

                                                                                                                                                                                                                                              We can argue over the specifics for sure, but simply imperatively changing your UI whenever your data changes doesn't scale very far, neither in term of codebase nor in terms of team.

                                                                                                                                                                                                                                              • taeric 7 months ago
                                                                                                                                                                                                                                                I think there are assumptions here that are not shared?

                                                                                                                                                                                                                                                First, there is an implication that the HTTP model is benign in the complications that we see in web applications. I don't think it would take a lot of arguments to bust this? Trying to hide it, also leads to several problems of its own.

                                                                                                                                                                                                                                                Second, that the rest of the abstractions in a browser are benign in the complications most people complain about. The DOM, CORS, general document structure, CSS(!), and all of the extra APIs that browsers have added through the years are building on some rather awkward layers. I don't think it is hard to argue that the biggest reason that browsers have had the success and development that they have had, is the privilege that we have given port 80 in the world.

                                                                                                                                                                                                                                                Now. I think an area we would have solid agreement on, is that I don't necessarily think we had better options along the way?

                                                                                                                                                                                                                                                Bringing this back to frameworks, though, tooling is tough to ignore. The tooling that people used to have in easy application creation is tough to scoff at. I think it is safe to say that Dreamweaver was also not that bad, looking back. We had some odd purity tests on whether or not it should use tables for layout. Hard to really keep that complaint top of mind when I look at the absurd amount of markup that is in so many sites, nowadays.

                                                                                                                                                                                                                                                • bobthepanda 7 months ago
                                                                                                                                                                                                                                                  tables with layout wasn't really an issue of purity, but they were another layer of the cruft you described where we were abusing things not built to actually do that.

                                                                                                                                                                                                                                                  grid and flexbox are probably closer to actually being a one-stop easy-to-use paradigm with less nasty edge cases than tables, but all the table code stuff is still there if you really want to do it.

                                                                                                                                                                                                                                                  ---

                                                                                                                                                                                                                                                  > I don't think it is hard to argue that the biggest reason that browsers have had the success and development that they have had, is the privilege that we have given port 80 in the world.

                                                                                                                                                                                                                                                  I actually think this is orthogonal. The power of frameworks like React is that nobody wants to write the same app five times (windows/mac/linux/ios/android) using sometimes wildly different native coding paradigms, and coordinating feature development across native platforms is like herding cats.

                                                                                                                                                                                                                                                  • lmm 7 months ago
                                                                                                                                                                                                                                                    We always had better options than CSS. The whole industry went in the wrong direction for years. But React is the opposite of that, it's someone finally bringing some sanity to the web.
                                                                                                                                                                                                                                                  • EternalFury 7 months ago
                                                                                                                                                                                                                                                    You must have found a way to add more components, actions, properties, etc. automatically when your data models change. Otherwise, you are changing your UI every time those change. Except that now you have to maintain DTOs, models, actions, APIs, schemas, etc. in many places and across many teams.

                                                                                                                                                                                                                                                    Sorry, I have been around the block so many times, there’s now a moat around the block.

                                                                                                                                                                                                                                                  • mrtksn 7 months ago
                                                                                                                                                                                                                                                    React was my reason to distance myself from Web frontend. Huge complexity just to make the web browser render boxes in a way it’s not intended to do. Huge loss of productivity and tooling in the name of changing a coding paradigm. Some cool ideas and implementations, sure but was it worth it? Maybe it was a job security stunt or something of that sort?

                                                                                                                                                                                                                                                    Well it wasn’t just ReactJS, the whole JavaScript ecosystem went mad with its libraries and tooling for all these libraries but React was particularly annoying to get started so they built create react app so you can have a hello world app in a reasonable time.

                                                                                                                                                                                                                                                    • veidelis 7 months ago
                                                                                                                                                                                                                                                      What is your alternative to the problems that React supposedly solves?
                                                                                                                                                                                                                                                      • mrtksn 7 months ago
                                                                                                                                                                                                                                                        I no longer have an idea for the web, I do native mobile apps now. SwiftUI for example shares many ideas with react, like being declarative.

                                                                                                                                                                                                                                                        The difference is, in SwiftUI you fire up Xcode and you are up and ready to build the thing you intend to. No tooling setup, no intermediate steps to transpile the code into something you can’t recognize and the “backend” that deals with the logic is the same language with the same paradigms. Mind you, SwiftUI is considered a downgrade when it comes to tooling. Yet everything fits and you didn’t spend mental energy to try to make the tools work as intended.

                                                                                                                                                                                                                                                        My mantra now is to use the tool that is built to do the things I want to do and stop trying to make make it work in ways it’s not intended to. That’s why when I want to have a web interface I simply work with DOM directly. That’s how the creators of the web browser intended:) No virtual DOM, no libraries doing magic and managing the DOM for me. I'm sure there's place for ReactJS too, it's just that its not for most use cases.

                                                                                                                                                                                                                                                        All I want is tools that I can fully fit in my working memory and don’t spend time trying to make things work so I can do the work I care about. Simplicity and robustness is the paramount.

                                                                                                                                                                                                                                                      • phist_mcgee 7 months ago
                                                                                                                                                                                                                                                        >in a way it’s not intended to do

                                                                                                                                                                                                                                                        Yeah that just isn't true. No matter how much you want it, the days of html pages with anchor tags and <table> elements centering content are gone.

                                                                                                                                                                                                                                                        Move on man.

                                                                                                                                                                                                                                                        • recursive 7 months ago
                                                                                                                                                                                                                                                          Html, anchor tags, and tables are definitely not gone. Now we center with CSS. I suspect these things will be staying around longer than react will.
                                                                                                                                                                                                                                                          • mrtksn 7 months ago
                                                                                                                                                                                                                                                            I moved on. To native apps.

                                                                                                                                                                                                                                                            It’s great.

                                                                                                                                                                                                                                                            Btw the web tech has come a long way since. Native browser API is amazing, CSS is wonderful and I’m particularly excited for Web assembly. Drop the virtual DOM stuff and all other Frankenstein BS and working on the browser is actually fun again.

                                                                                                                                                                                                                                                        • Muromec 7 months ago
                                                                                                                                                                                                                                                          That's because VC funded software development is a welfare program for smart people that also want to have fun. It's okay.
                                                                                                                                                                                                                                                          • efortis 7 months ago
                                                                                                                                                                                                                                                            I like React but since hooks (v16.8), React’s changes are nothing but skill bragging.

                                                                                                                                                                                                                                                            I stopped hoping for the reason behind changing the class components API to hooks.

                                                                                                                                                                                                                                                            • kobalsky 7 months ago
                                                                                                                                                                                                                                                              > we managed to add complexity wherever possible

                                                                                                                                                                                                                                                              Did you? You can always opt for a simpler framework and you can avoid server orchestation. If you are not in the position to choose then you could work on starting your own project if you think you will have a efficiency edge over the rest with your simpler stack.

                                                                                                                                                                                                                                                              • ken47 7 months ago
                                                                                                                                                                                                                                                                React and similar frameworks have made it easier to manage a given level of complexity. The complexity of app features have adjusted and will continue to adjust to the new frontier enabled by said frameworks.
                                                                                                                                                                                                                                                                • paulddraper 7 months ago
                                                                                                                                                                                                                                                                  > we managed to add complexity wherever possible

                                                                                                                                                                                                                                                                  Sure you can centralize your complexity. But that doesn't necessarily get rid of this.

                                                                                                                                                                                                                                                                  You can put database queries, business logic, UI interactions, etc all in one place.

                                                                                                                                                                                                                                                                  • ransom1538 7 months ago
                                                                                                                                                                                                                                                                    I just rsynced my php files over. ci/cd done. php does html/css ui done. I am not sure what all the js trend is about.
                                                                                                                                                                                                                                                                    • veidelis 7 months ago
                                                                                                                                                                                                                                                                      You just havent worked on an app that is heavy on client state.
                                                                                                                                                                                                                                                                  • htunnicliff 7 months ago
                                                                                                                                                                                                                                                                    One of the best parts of this release:

                                                                                                                                                                                                                                                                        ref as a prop: Refs can now be used as props, removing the need for forwardRef.
                                                                                                                                                                                                                                                                    • terandle 7 months ago
                                                                                                                                                                                                                                                                      Being able to <Context value={1}> instead of <Context.Provider value={1}> is also a nice, albeit small, QOL change. Feels like they are really honing down the API. Esp once they kill off useMemo and related hooks with the compiler.
                                                                                                                                                                                                                                                                      • quasarj 7 months ago
                                                                                                                                                                                                                                                                        Very nice, something I actually care about!
                                                                                                                                                                                                                                                                      • cyral 7 months ago
                                                                                                                                                                                                                                                                        The blog post is an easier read: https://react.dev/blog/2024/12/05/react-19
                                                                                                                                                                                                                                                                        • nailer 7 months ago

                                                                                                                                                                                                                                                                              const error = await updateName(newName);
                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                          Why would updateName return an error? Why not just throw an Error like JS/TS?
                                                                                                                                                                                                                                                                          • Mogzol 7 months ago
                                                                                                                                                                                                                                                                            It's just an example async call, it could be anything. It's not the important part of that code example, it's only purpose is to show that an async call is happening. It could be written as a try/catch, or it could be written how they wrote it. I guess they chose that way because it's short and to the point.
                                                                                                                                                                                                                                                                            • nailer 7 months ago
                                                                                                                                                                                                                                                                              Good example code is otherwise uninteresting apart from the concept that is meant to be shown.
                                                                                                                                                                                                                                                                            • rtpg 7 months ago
                                                                                                                                                                                                                                                                              Some guesses:

                                                                                                                                                                                                                                                                              - People really like Result structures

                                                                                                                                                                                                                                                                              - People who wrote the API believe in the "operational issues and business issues should not be comingled" philosophy (so this function might raise on a connection error, but it _won't_ raise when there's simply an error like a name conflict)

                                                                                                                                                                                                                                                                              - People who wrote the example write Too Much(TM) Go

                                                                                                                                                                                                                                                                              • BillSaysThis 7 months ago
                                                                                                                                                                                                                                                                                updateName is a call to the backend/server to update the database...
                                                                                                                                                                                                                                                                            • pixelsort 7 months ago
                                                                                                                                                                                                                                                                              There are 45 comments so far and 7 references to "redux". I'm just gonna rep for the Recoil clones here and mention Jotai, which likely already works with React 19 without any necessary changes.

                                                                                                                                                                                                                                                                              With enough front-end complexity, other state managers get in the way more than should. So, to anyone who might be tempted to hate on React, but really has just grown weary of endless walls of action constants, or plumbing props, or fighting nested providers/contexts, or resorting to pub-sub; give something like Jotai a shot.

                                                                                                                                                                                                                                                                              • Izkata 7 months ago
                                                                                                                                                                                                                                                                                The people behind Jotai also made Zustand and Valtio:

                                                                                                                                                                                                                                                                                https://github.com/pmndrs/zustand

                                                                                                                                                                                                                                                                                https://github.com/pmndrs/valtio

                                                                                                                                                                                                                                                                                To me it feels like Jotai has too much manual boilerplate and Valtio has a lot of proxy "magic" that while I do like it I don't feel like it would be a good idea for a team. Zustand sits right in the middle of boilerplate-vs-magic, and is what I chose for a large project we're doing now.

                                                                                                                                                                                                                                                                                • beaugunderson 7 months ago
                                                                                                                                                                                                                                                                                  I used Valtio for a guitar pedal librarian program recently and it's fantastic. Had zero issues with proxy state, it all "just worked".
                                                                                                                                                                                                                                                                                • Rohansi 7 months ago
                                                                                                                                                                                                                                                                                  I don't understand why state management is filled with so much weird terminology. When I started working on a React app years ago every state management package I saw was filled with it - and they still are.

                                                                                                                                                                                                                                                                                  I ended up rolling my own solution [1] to escape all that so I could focus on getting things done. It's been working great for me in production. Too bad there's no popular option that works similarly.

                                                                                                                                                                                                                                                                                  [1] https://github.com/facepunch/react-class-model

                                                                                                                                                                                                                                                                                  • Izkata 7 months ago
                                                                                                                                                                                                                                                                                    Looking at how CounterDisplay and CounterControls work at the bottom of the README, the idea behind this is similar to Valtio (direct updates and changes are pushed on update), except with a lot more manual work. Valtio uses proxies and hooks to get the effect of CounterModel, CounterModelProvider, and useCounterModel automatically, without having to write them yourself.

                                                                                                                                                                                                                                                                                    For comparison, Valtio has the same kind of "counter" example at the top of their README (first and third code blocks): https://github.com/pmndrs/valtio?tab=readme-ov-file#wrap-you...

                                                                                                                                                                                                                                                                                    • Rohansi 7 months ago
                                                                                                                                                                                                                                                                                      That looks pretty similar but I like the use of classes in react-class-model to encourage keeping logic out of components. It's not shown in the readme but using context is optional - you can similarly achieve global state by storing it in a variable and then using `watchCounterModel` (the third return value from `defineModel`) to subscribe to updates on it. Both hooks also return proxies to re-render only when the referenced fields change.
                                                                                                                                                                                                                                                                                  • babyshake 7 months ago
                                                                                                                                                                                                                                                                                    When I go to Jotai npm docs page (https://www.npmjs.com/package/jotai) I don't really get the impression of how this helps get away from using a lot of different context providers or Redux. The nice thing about context hooks is they are composable, combined with cached queries you can have a decently maintainable pattern. How does Jotai provide a tangible improvement on this?
                                                                                                                                                                                                                                                                                    • pixelsort 7 months ago
                                                                                                                                                                                                                                                                                      The benefits would depends on how your code is structured, which dependencies you use, and overall complexity. Contexts provide and elegant developer experience, up until they don't. Have you ever implemented nested SplitView components under Dockview? It can be brutal on contexts.

                                                                                                                                                                                                                                                                                      As a developer, I value solutions that never fail me. I wasn't driven to Jotai out of good taste. Simplicity and reliability are the benefits I find the most tangible. But Jotai's atomicity brings renderer optimizations as code splitting advantages that I haven't seen from the flux/redux clones before either.

                                                                                                                                                                                                                                                                                      • kn8 7 months ago
                                                                                                                                                                                                                                                                                        https://github.com/KidkArolis/kinfolk - recoil/jotai, but simpler
                                                                                                                                                                                                                                                                                      • 0xblinq 7 months ago
                                                                                                                                                                                                                                                                                        +1

                                                                                                                                                                                                                                                                                        I’ve used it in a largeish project and I liked it a lot.

                                                                                                                                                                                                                                                                                        I rally hope I never have to deal again with redux or sagas

                                                                                                                                                                                                                                                                                        • qudat 7 months ago
                                                                                                                                                                                                                                                                                          Everyone should try https://starfx.bower.sh which is a fresh take on state and more importantly, side effect management.
                                                                                                                                                                                                                                                                                          • tuan 7 months ago
                                                                                                                                                                                                                                                                                            maybe the apps that I've worked on are not complex enough, but I found that Relay + Context API combo solves the state management problem for us. We have not had to use any state managers yet.
                                                                                                                                                                                                                                                                                          • gr4vityWall 7 months ago
                                                                                                                                                                                                                                                                                            I don't like most of the new features introduced. Actions, and the useActionState/useOptimistic hooks seem like massive complexity pitfalls. The 'use' hook has a very uninformative name. It doesn't handle promises created inside the component. While I assume there are very good reasons for that, my impression is that passing promises as props and handling them with the use hook will create more complexity - more than current workarounds.

                                                                                                                                                                                                                                                                                            Server Components also look fairly complex, and I'm glad I haven't had to deal with them so far.

                                                                                                                                                                                                                                                                                            The improved error messages on hydration errors are welcomed. The <Context> as a provider and ref as a prop changes are nice QoL changes.

                                                                                                                                                                                                                                                                                            Overall, I like React/Preact as far as building SPAs go. Using it with a feature-rich component library (say, MUI) and a simple state management solution (like Preact Signals) makes it very straightforward to build SPAs, as far as I'm concerned. But I worry about the complexity creep. The descriptions for the new hooks in those release notes put a massive cognitive load on me just by reading them.

                                                                                                                                                                                                                                                                                            The React Compiler, on the other hand, is a much needed tool. It should result in components that are less complex, as the programmer won't have to write typical optimizations by hand, as part of the component itself. I'm looking forward to its release and eventual integrations with Vite and etc. From what I heard, Preact will support it too.

                                                                                                                                                                                                                                                                                            • tuan 7 months ago
                                                                                                                                                                                                                                                                                              I wish they rename "use" API to something else other than the common prefix for hooks. I imagine someone new to React hooks might be confused when they see that `use` can be called conditionally, while hooks can't.
                                                                                                                                                                                                                                                                                              • ENGNR 7 months ago
                                                                                                                                                                                                                                                                                                Really glad they delayed the release to (hopefully) solve the parallel suspense issue. Haven’t tried it yet but high hopes, and great release overall.
                                                                                                                                                                                                                                                                                              • wg0 7 months ago
                                                                                                                                                                                                                                                                                                Breaking news - full support for custom elements. Web components that is.
                                                                                                                                                                                                                                                                                                • jmull 7 months ago
                                                                                                                                                                                                                                                                                                  Does react use semantic versioning?

                                                                                                                                                                                                                                                                                                  I’d hate to have to deal with incompatible versions at the rate they release major versions.

                                                                                                                                                                                                                                                                                                  If you try to stick with one version do you soon get stuck because you need to take a bug fix or security fix that’s only available in a later major release (but updating breaks other things)?

                                                                                                                                                                                                                                                                                                  I want to build software on a stable platform so I can spend time on improving the software or writing something new, not keeping up with updates.

                                                                                                                                                                                                                                                                                                  • alexanderchr 7 months ago
                                                                                                                                                                                                                                                                                                    The numbers are high because they jumped directly from 0.14 to 15.0, but the cadence is not particularly high: 18.0 was released early 2022, 17.0 late 2020 and 16.0 late 2017. That’s three major releases in seven years.

                                                                                                                                                                                                                                                                                                    React is stable, upgrading it is painless as long as you don’t ignore deprecation warnings. What can be annoying is other (abandoned) dependencies holding you back from upgrading.

                                                                                                                                                                                                                                                                                                    • nox101 7 months ago
                                                                                                                                                                                                                                                                                                      upgrading is far from painless. If you're using any 3rd party solutions and they aren't compatible with the latest React you're going to have a bad time.
                                                                                                                                                                                                                                                                                                      • esperent 7 months ago
                                                                                                                                                                                                                                                                                                        That's a problem any popular library will have.

                                                                                                                                                                                                                                                                                                        What's the solution?

                                                                                                                                                                                                                                                                                                        • alexanderchr 7 months ago
                                                                                                                                                                                                                                                                                                          Yeah, as I said above I don't disagree. The ecosystem has lots of issues but React gets all the hate, unfairly in my opinion. It's a pretty well maintained piece of software.
                                                                                                                                                                                                                                                                                                        • wordofx 7 months ago
                                                                                                                                                                                                                                                                                                          > upgrading it is painless as long as you don’t ignore deprecation warnings

                                                                                                                                                                                                                                                                                                          Maybe if you have a small app. React is as bad as going from angular to angular 2

                                                                                                                                                                                                                                                                                                          • alexanderchr 7 months ago
                                                                                                                                                                                                                                                                                                            Yeah I'm just going to choose to not take you seriously if you claim that any React version bump is as bad as moving to a completely new framework (which is effectively what angular 1->2 was).
                                                                                                                                                                                                                                                                                                            • Hrun0 7 months ago
                                                                                                                                                                                                                                                                                                              > Maybe if you have a small app. React is as bad as going from angular to angular 2

                                                                                                                                                                                                                                                                                                              You have no idea what you are talking about.

                                                                                                                                                                                                                                                                                                            • veidelis 7 months ago
                                                                                                                                                                                                                                                                                                              I cant imagine saying upgrading is painless considering the way how React deprecated class components.
                                                                                                                                                                                                                                                                                                              • acemarke 7 months ago
                                                                                                                                                                                                                                                                                                                What specifically are you referring to?

                                                                                                                                                                                                                                                                                                                The original `createClass` API was indeed deprecated and removed all the way back in 2017 [0]. You can still use them today with the separated `create-react-class` package.

                                                                                                                                                                                                                                                                                                                ES6 class components still work as-is even in React 19 - it's just the legacy context feature that's been removed. They're generally discouraged, in that function components are now the standard way to use React, but they're still not "deprecated" in the sense of a warning or removal.

                                                                                                                                                                                                                                                                                                                [0] https://legacy.reactjs.org/blog/2017/09/26/react-v16.0.html#...

                                                                                                                                                                                                                                                                                                                • aidos 7 months ago
                                                                                                                                                                                                                                                                                                                  The react team have done an incredible job maintaining backwards compatibility across versions over the years. They’ve even fought for bug parity when doing major internal rewrites.
                                                                                                                                                                                                                                                                                                                  • robertoandred 7 months ago
                                                                                                                                                                                                                                                                                                                    Good thing class components are not deprecated. Where’d you get that from?
                                                                                                                                                                                                                                                                                                                • acemarke 7 months ago
                                                                                                                                                                                                                                                                                                                  Yes, React uses semver. React 19 has been in development for over 2+ years - React 18.2 (the last meaningful minor release) came out in June 2022, so the release pace has been slow enough people have complained that it's _too_ slow:

                                                                                                                                                                                                                                                                                                                  - https://macwright.com/2024/01/03/miffed-about-react

                                                                                                                                                                                                                                                                                                                  (looks like the author may have an HN-specific redirect, so you might need to copy-paste that URL)

                                                                                                                                                                                                                                                                                                                • blastonico 7 months ago
                                                                                                                                                                                                                                                                                                                  I see people complaining a lot about React, why is it? What are the alternatives?

                                                                                                                                                                                                                                                                                                                  PS: I'm not a frontend engineer but I find this topic interesting.

                                                                                                                                                                                                                                                                                                                  Thanks!

                                                                                                                                                                                                                                                                                                                  • sensanaty 7 months ago
                                                                                                                                                                                                                                                                                                                    Vue is infinitely better in pretty much every way other than available libraries (specifically UI libraries and some stuff like Motion, though that's soon-to-be framework independent), but to be honest I've never felt that problem in my 6 years working with both, and especially in more recent times pretty much everything is framework agnostic anyways, even the big popular ones like TanStack Query.

                                                                                                                                                                                                                                                                                                                    The one real edge I'll give React is much better Typescript support due to tsx essentially being a superlanguage of TS. Vue's composables are very good, but it falls apart a bit in actual template usage. Tooling is also better, but that's also because it's simply used much more so has had more investment into making the tooling good compared to Volar for Vue.

                                                                                                                                                                                                                                                                                                                    But in my opinion everything else surrounding Vue makes it superior. Signals are a better state management pattern, there aren't all the insane footguns that React comes with, performance is better out-of-the-box and is practically impossible to fuck up compared to React where it's hilariously easy to make even the simplest of apps be performance monstrosities, the documentation is (IMO, I find React's docs (yes I've seen the new ones) terrible) best-in-class, the gilded libraries like Pinia, Vue Router, VueUse are far superior to anything in the React ecosystem...

                                                                                                                                                                                                                                                                                                                    I could keep going, but having worked with both more or less equally, I'd choose Vue 10/10 times over React, no questions asked. I can throw a junior at the codebase and be 100% confident they'll make something that's more-or-less idiomatic Vue code, even with the Composition API which is less stringent than the old Options API, whereas with React they'll always need hand holding and I'll always need to explain why things are rerendering twice or running terribly or what useMemo does or what useEffect does (or doesn't) do...

                                                                                                                                                                                                                                                                                                                    • STRiDEX 7 months ago
                                                                                                                                                                                                                                                                                                                      I used vue 2 for work during the switch to vue 3. It was horrific to watch as the vue community had to relearn the worst parts of the class components and the massive shortcomings of both the template library type checking and the other parts that basically can't ever support typescript like class mixins. If you want to use vue with a .tsx file you might as well use react.

                                                                                                                                                                                                                                                                                                                      Today, 33% of vue downloads in the last 7 days are for vue 2.

                                                                                                                                                                                                                                                                                                                      There was a lot of things that were nice in the vue world like vite and vuex, but I'd never recommend vue to anyone, especially anyone that wants a good typescript experience.

                                                                                                                                                                                                                                                                                                                      here's an example library button using .tsx in vue https://github.com/vuetifyjs/vuetify/blob/master/packages/vu...

                                                                                                                                                                                                                                                                                                                      • sensanaty 7 months ago
                                                                                                                                                                                                                                                                                                                        I feel like your experience is a bit jaded by the 2 -> 3 transition which is understandable because it wasn't the smoothest, but these days things are very stable, and you can even use the CompositionAPI in Vue 2.7 as it's been backported if you can't upgrade from 2 -> 3. Typescript support is also great because composables are just regular JS/TS files now rather than a Vue-specific thing, the only part that is a bit wonky is in templates sometimes, though for the majority of code out there even template type checking works just as you'd expect, I very rarely have issues even with huge components.

                                                                                                                                                                                                                                                                                                                        Pinia is Vuex, it was made by the same people specifically for Vue 3 due to otherwise having to introduce a lot of breaking changes and is a lot simpler than VueX was, as it leverages the composable pattern and gets rid of the need to do things like `mapGetters`/`mapActions`. And VueX 4 is still an option for those that prefer that approach.

                                                                                                                                                                                                                                                                                                                        > ... class mixins

                                                                                                                                                                                                                                                                                                                        Those were a pain point, but no longer relevant in Vue 3 as mixins have been deprecated. Again, composition takes its place and is in general much more powerful while being simpler. For a great example of what composables can achieve, I'd recommend taking a look at VueUse (https://vueuse.org/)

                                                                                                                                                                                                                                                                                                                        > Today, 33% of vue downloads in the last 7 days are for vue 2.

                                                                                                                                                                                                                                                                                                                        Another way to look at that is that the majority of the community is on Vue 3 :)

                                                                                                                                                                                                                                                                                                                        > If you want to use vue with a .tsx file you might as well use react.

                                                                                                                                                                                                                                                                                                                        `.tsx` is very much a personal preference thing and isn't really considered idiomatic despite Vue having support for it (unless you're a library author like Vuetify that you linked). I personally can't stand working with `jsx` and find Vue SFC's superior, and again, typechecking these days is much better than it ever was and will work just fine in 95% of situations. Especially with things like component generics being introduced, it's only gotten better and actively getting better.

                                                                                                                                                                                                                                                                                                                        I'd highly recommend you give Vue 3 a try with an open mind, because things have only gotten more powerful while getting simpler since the Vue 2 days.

                                                                                                                                                                                                                                                                                                                      • lucsky 7 months ago
                                                                                                                                                                                                                                                                                                                        > having worked with both more or less equally, I'd choose Vue 10/10 times over React

                                                                                                                                                                                                                                                                                                                        I have the exact opposite experience, I find Vue hilariously bad to the point of being repulsive. Now what?

                                                                                                                                                                                                                                                                                                                        • stevev 7 months ago
                                                                                                                                                                                                                                                                                                                          Using both I think it comes down to personal preferences. One learns to appreciate their approaches to the complexity of FE dev. I do think ultimately it comes down to support , tooling and job opportunities. I was an advocate for Vue and now unfortunately I recommend React. Native mobile development is too important to disregard.
                                                                                                                                                                                                                                                                                                                          • sensanaty 7 months ago
                                                                                                                                                                                                                                                                                                                            I mean that's fine, these are all just opinions of randoms on the internet at the end of the day. I find jsx "repulsive", you probably find SFC's "repulsive", and the nice thing is we each have a choice in what we want to use.
                                                                                                                                                                                                                                                                                                                          • CharlieDigital 7 months ago
                                                                                                                                                                                                                                                                                                                            Another vote for Vue.

                                                                                                                                                                                                                                                                                                                            It's harder to do poorly and even when you do, it doesn't punish you the same way that React does.

                                                                                                                                                                                                                                                                                                                            • stevev 7 months ago
                                                                                                                                                                                                                                                                                                                              Nice opinion. I started with Vue2/3 and now I’m learning react. Vue is designed better but react is further in development and more widely supported. Native mobile performance was the deal breaker. Ultimately you’ll find it easier to get a job using react vs vue.
                                                                                                                                                                                                                                                                                                                              • sensanaty 7 months ago
                                                                                                                                                                                                                                                                                                                                Indeed React unfortunately wins over in terms of quantity of jobs, I'd argue mostly due to network effects. Hopefully that changes some day!

                                                                                                                                                                                                                                                                                                                                Native development is definitely a pain point, unfortunately there's few options other than React Native there. Problem being that React is backed by Meta, so obviously it has a lot more money being thrown at it compared to competitors like Vue or Svelte.

                                                                                                                                                                                                                                                                                                                              • FrontAid 7 months ago
                                                                                                                                                                                                                                                                                                                                > specifically UI libraries

                                                                                                                                                                                                                                                                                                                                There are certainly more UI libraries available for React than any other framework [1]. But do you think that these are also clearly better? What would be your go to framework for React? To me, it seems that the trend is going to framework-agnostic or multi-framework libraries anyway (e.g. Ark UI or Zag).

                                                                                                                                                                                                                                                                                                                                [1] https://frontaid.ch/web/ui/libraries.html

                                                                                                                                                                                                                                                                                                                                • sensanaty 7 months ago
                                                                                                                                                                                                                                                                                                                                  I personally completely avoid UI libraries as we have our own that we built in-house, so I wouldn't know, I just know there's more of them and they're more mature in React land.

                                                                                                                                                                                                                                                                                                                                  But gun to my head, Shadcn would probably be my choice. For Vue it'd be PrimeVue. Those are the two highest quality ones I've tried in small projects, so no clue how they scale in real-world projects.

                                                                                                                                                                                                                                                                                                                                • t-writescode 7 months ago
                                                                                                                                                                                                                                                                                                                                  > other than available libraries

                                                                                                                                                                                                                                                                                                                                  That's doing a *lot* of heavy lifting here. That's like saying "D is infinitely better than C++, except for available libraries".

                                                                                                                                                                                                                                                                                                                                  While my current Electron personal project will probably use Vue because I want to learn it, the change in libraries (and lack of plug-and-play support for whole companies' provided frameworks) is a real barrier to entry for a lot of work.

                                                                                                                                                                                                                                                                                                                                  • sensanaty 7 months ago
                                                                                                                                                                                                                                                                                                                                    Sure, all I said was that I personally never felt the pain there because everything I ever needed was available for Vue, especially these days with so many libraries and stuff like that being framework-agnostic. I've never worked on Native/Electron projects, so there might very well be a huge gap there that is unfilled by Vue, I wouldn't know, though I suspect from experience with both that the gap here is greatly exaggerated (except for Native/Mobile for sure, React Native is basically on its own there) for the large majority of projects.
                                                                                                                                                                                                                                                                                                                                • terandle 7 months ago
                                                                                                                                                                                                                                                                                                                                  Hacker News is a bunch of older grumpy folks that want to keep using jQuery. Also some had a bad time with classic redux patterns that were a terrible atrocity - but also not reacts fault, however they have a strong association with each other. Modern react w/ modern state management patterns is a joy to use.
                                                                                                                                                                                                                                                                                                                                  • phist_mcgee 7 months ago
                                                                                                                                                                                                                                                                                                                                    Remember too, that the loudest minority is not always right.

                                                                                                                                                                                                                                                                                                                                    There are millions of developers happily using react every day. They just don't come onto HN to complain about the "woeful state" of frontend.

                                                                                                                                                                                                                                                                                                                                    • ncann 7 months ago
                                                                                                                                                                                                                                                                                                                                      What is considered "modern state management" these days?
                                                                                                                                                                                                                                                                                                                                      • terandle 7 months ago
                                                                                                                                                                                                                                                                                                                                        If building a SSR site with nextjs use react server components and react context

                                                                                                                                                                                                                                                                                                                                        If building a SPA site with vite use tanstack/react-query and react context. There are other great libraries like zustand and jotai that can make sense in certain kinds of more complex applications.

                                                                                                                                                                                                                                                                                                                                    • nailer 7 months ago
                                                                                                                                                                                                                                                                                                                                      Svelte. Rather than

                                                                                                                                                                                                                                                                                                                                          const [name, setName] = useState('blastonico')
                                                                                                                                                                                                                                                                                                                                          ...
                                                                                                                                                                                                                                                                                                                                          setName('nailer')
                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                      You do:

                                                                                                                                                                                                                                                                                                                                         let name = 'blastonico'
                                                                                                                                                                                                                                                                                                                                         ...
                                                                                                                                                                                                                                                                                                                                         name = 'nailer'
                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                      Also a single .svelte file includes everything you need for a component (HTML, JS, CSS), so it's easier to manage.
                                                                                                                                                                                                                                                                                                                                      • phailhaus 7 months ago
                                                                                                                                                                                                                                                                                                                                        `setName` makes sure that state changes are queued up for the next render, allowing you to treat all state and props as constant within the current render. If you are just assigning variables directly, then your state is changing within the same render cycle, which can lead to all sorts of nasty bugs that are difficult to replicate.

                                                                                                                                                                                                                                                                                                                                        I get that assigning variables is easier to understand, but it's way, way harder to actually scale and maintain. Check out flux architecture.

                                                                                                                                                                                                                                                                                                                                        • nailer 7 months ago
                                                                                                                                                                                                                                                                                                                                          > If you are just assigning variables directly

                                                                                                                                                                                                                                                                                                                                          We’re not just assigning variables directly, current JavaScript frameworks use a compiler.

                                                                                                                                                                                                                                                                                                                                          • remram 7 months ago
                                                                                                                                                                                                                                                                                                                                            setName() vs name= are just syntax. None of those have anything to do with how state changes. If you have control over the compiler (which they do) there's no reason it can't do the right thing (case in point, svelte).
                                                                                                                                                                                                                                                                                                                                            • ww520 7 months ago
                                                                                                                                                                                                                                                                                                                                              Just curious. How does that work on changes between depending states within a cycle? E.g.

                                                                                                                                                                                                                                                                                                                                                 [foo, setFoo] = useState(1);
                                                                                                                                                                                                                                                                                                                                                 [bar, setBar] = useState();
                                                                                                                                                                                                                                                                                                                                                 setFoo(10);
                                                                                                                                                                                                                                                                                                                                                 setBar(foo * 2);  // Is bar 2 or 20 at this point?
                                                                                                                                                                                                                                                                                                                                            • ptrwis 7 months ago
                                                                                                                                                                                                                                                                                                                                              let name = $state('blastonico')
                                                                                                                                                                                                                                                                                                                                              • namrog84 7 months ago
                                                                                                                                                                                                                                                                                                                                                I know some people didn't like this change. I think it works well to help make it clear and obvious to reactive vs non reaction changes.
                                                                                                                                                                                                                                                                                                                                              • efields 7 months ago
                                                                                                                                                                                                                                                                                                                                                Vue is also nice.
                                                                                                                                                                                                                                                                                                                                                • nailer 7 months ago
                                                                                                                                                                                                                                                                                                                                                  Yep. Svelte's SFC was inspired by Vue. If you like Vue you'll like Svelte which is familiar but adds a compiler for simpler syntax.
                                                                                                                                                                                                                                                                                                                                                • lucsky 7 months ago
                                                                                                                                                                                                                                                                                                                                                  Overriding standard language constructs with magic behaviors is a giant no-no and a recipe for disaster.
                                                                                                                                                                                                                                                                                                                                                • nox101 7 months ago
                                                                                                                                                                                                                                                                                                                                                  My experience

                                                                                                                                                                                                                                                                                                                                                  1. Write some solution with out a UI

                                                                                                                                                                                                                                                                                                                                                  2. Decide you want a UI

                                                                                                                                                                                                                                                                                                                                                  3. Add React

                                                                                                                                                                                                                                                                                                                                                  4. Be forced to re-architect your solution because react wants control of all of your state.

                                                                                                                                                                                                                                                                                                                                                  React is supposed to be the V (View) in MVC but it requires full control of the M (model) in MVC and bleeds into the C (controller) as well.

                                                                                                                                                                                                                                                                                                                                                  Someone will likely chime in that you can just tell React to re-render the entire UI every frame or write lots of custom functions to monitor your model but that's not really the point. No other UI paradigm requires this.

                                                                                                                                                                                                                                                                                                                                                  • rtpg 7 months ago
                                                                                                                                                                                                                                                                                                                                                    The way you can avoid this:

                                                                                                                                                                                                                                                                                                                                                    - design "UI struct" for what you want to display

                                                                                                                                                                                                                                                                                                                                                    - Have React fire off events when doing actions

                                                                                                                                                                                                                                                                                                                                                    - Those actions get piped into your UI-less solution

                                                                                                                                                                                                                                                                                                                                                    - Your UI-less solution updates the "UI struct"

                                                                                                                                                                                                                                                                                                                                                    - React updates the parts of the tree that was using part of your struct

                                                                                                                                                                                                                                                                                                                                                    if you design this struct in the right way, you can have the updates be _very_ targetted (like, React doing basically no extra work). But your UI struct needs to be really carefully set up so you're not firing things off all over the place.

                                                                                                                                                                                                                                                                                                                                                    I think it's still an easier problem than keeping your DOM in sync entirely, but it's unfortunately very easy to accidentally over-render still.

                                                                                                                                                                                                                                                                                                                                                    • t-writescode 7 months ago
                                                                                                                                                                                                                                                                                                                                                      When you say "write a solution without ui", do you mean "write a frontend solution without a ui"? What's a frontend solution without ui? I thought all of UI code was intended to serve the frontend.

                                                                                                                                                                                                                                                                                                                                                      Are you referring to Electron apps or something?

                                                                                                                                                                                                                                                                                                                                                    • 7 months ago
                                                                                                                                                                                                                                                                                                                                                      • seanvelasco 7 months ago
                                                                                                                                                                                                                                                                                                                                                        Solid.js is the real alternative to React
                                                                                                                                                                                                                                                                                                                                                        • azemetre 7 months ago
                                                                                                                                                                                                                                                                                                                                                          I feel like most of the issues devs have with react are the community surrounding it. Lots of churn and burn libraries with breaking issues and changing APIs, NodeJS issues that effect the ecosystem (like node-sass vs dart-sass), and a snake oil aspect from charlatans that you see on social media (granted this is not limited to react, but it feels like react has the most of them).
                                                                                                                                                                                                                                                                                                                                                          • bandrami 7 months ago
                                                                                                                                                                                                                                                                                                                                                            Using a scripting or templating language on the server to form and send HTML and CSS to the client as $DEITY intended
                                                                                                                                                                                                                                                                                                                                                            • vundercind 7 months ago
                                                                                                                                                                                                                                                                                                                                                              Unironically this. The fastest “web apps” I’ve seen that weren’t absolutely required to be javascript-heavy to operate by virtue of what they do, have been mostly or entirely rendered server-side and have just sent entire pages for most interactions. Still performed better than 99% of webapps.
                                                                                                                                                                                                                                                                                                                                                              • Muromec 7 months ago
                                                                                                                                                                                                                                                                                                                                                                Django is still there and is still better than Phoenix by the way. I didn't really touch it in about 10 years, but ... nothing changed. It's amazing!
                                                                                                                                                                                                                                                                                                                                                                • doodlesdev 7 months ago
                                                                                                                                                                                                                                                                                                                                                                  > and is still better than Phoenix by the way.

                                                                                                                                                                                                                                                                                                                                                                  What aspects of Django do you think still stand out compared to Phoenix? It seems like a very solid framework, specially with the recent release of Phoenix LiveView 1.0, which seems like a pretty solid approach to frontend. For context, I’ve worked with Django before but didn’t particularly enjoy the experience—not because of the framework itself (its documentation, ORM, and admin tooling are excellent) but because I’m not a fan of Python, particularly its packaging ecosystem and approach to async, which I find lacking. I haven’t used Phoenix or Elixir before, so I’m curious to hear from someone who has experience with both.

                                                                                                                                                                                                                                                                                                                                                              • breadwinner 7 months ago
                                                                                                                                                                                                                                                                                                                                                                You don't need a complex framework like React. Check out this SPA app: https://github.com/wisercoder/eureka/tree/master/webapp/Clie...

                                                                                                                                                                                                                                                                                                                                                                It uses a 500-line router and a 500-line UI component lib.

                                                                                                                                                                                                                                                                                                                                                              • uhoh-itsmaciek 7 months ago
                                                                                                                                                                                                                                                                                                                                                                Great to see this--there are some nice features that encourage using standard web technologies like forms, and some solid quality of life improvements.

                                                                                                                                                                                                                                                                                                                                                                However, I'm disappointed (but not surprised, this was listed as out of scope for 19) that triggering Suspense is still basically "use a framework that supports it." I have not been able to find any documentation or blog posts about the mechanism. I've tried to figure out how it works by looking at TanStack Query, but I've had limited success so far. I've found they're copying React's twist on Promises [1], but I haven't gotten this to work yet.

                                                                                                                                                                                                                                                                                                                                                                I know the general idea is you throw Promises, but Suspense explicitly forbids using promises created during rendering. This means you can't just interrupt the component's initial render to load some data, and then restart it when its data is available. This means the component needs to deal with null data somehow, instead of, e.g., being able to call a custom `useSomeData` hook and rely on it to first suspend and then return the loaded data. Not having to deal directly with loading states in individual components could simplify things quite a bit.

                                                                                                                                                                                                                                                                                                                                                                Has anyone explored this side of Suspense?

                                                                                                                                                                                                                                                                                                                                                                [1]: https://github.com/TanStack/query/blob/main/packages/query-c...

                                                                                                                                                                                                                                                                                                                                                                • acemarke 7 months ago
                                                                                                                                                                                                                                                                                                                                                                  Yeah, _we library maintainers_ are feeling the same way :)

                                                                                                                                                                                                                                                                                                                                                                  - https://bsky.app/profile/acemarke.dev/post/3lcitbmmfss2i

                                                                                                                                                                                                                                                                                                                                                                  Big picture as I understand it:

                                                                                                                                                                                                                                                                                                                                                                  The legacy and always-undocumented-but-everyone-knew-about-it approach was throwing a promise while rendering.

                                                                                                                                                                                                                                                                                                                                                                  `use` still actually does the same thing, but it also attaches some extra status fields to that promise, _and_ checks to see if you're consistently passing in the _same_ promise reference.

                                                                                                                                                                                                                                                                                                                                                                  In other words, it's the job of an external data fetching library to keep track of what query entry is being asked for, create and save a promise per cache entry _outside_ of the React component tree, and then return that promise somehow so the app developer can pass it to the `use` hook. In a sense, it's an async `Map`.

                                                                                                                                                                                                                                                                                                                                                                  As another example of this, my former teammate Brian Vaughn (previously on the React core team) ended up building his own implementation of that behavior in the conveniently-named `suspense` package:

                                                                                                                                                                                                                                                                                                                                                                  - https://suspense.vercel.app/

                                                                                                                                                                                                                                                                                                                                                                  Ultimately, the `use` hook and Suspense _does_ do exactly what you're asking for - the rest of the component gets to assume the data _does_ exist, since `use` will only let the execution continue once the promise has resolved.

                                                                                                                                                                                                                                                                                                                                                                  • uhoh-itsmaciek 7 months ago
                                                                                                                                                                                                                                                                                                                                                                    Oh awesome, thank you! I'll have to investigate this and play with it, but that makes sense.
                                                                                                                                                                                                                                                                                                                                                                • riffic 7 months ago
                                                                                                                                                                                                                                                                                                                                                                  here's what really matters: https://endoflife.date/react
                                                                                                                                                                                                                                                                                                                                                                  • mardifoufs 7 months ago
                                                                                                                                                                                                                                                                                                                                                                    React is very backwards compatible, so the eol is much less impactful than for say, vuejs
                                                                                                                                                                                                                                                                                                                                                                    • efields 7 months ago
                                                                                                                                                                                                                                                                                                                                                                      Imagine if HTML5 had an EoL.
                                                                                                                                                                                                                                                                                                                                                                      • nicce 7 months ago
                                                                                                                                                                                                                                                                                                                                                                        Some day
                                                                                                                                                                                                                                                                                                                                                                      • captn3m0 7 months ago
                                                                                                                                                                                                                                                                                                                                                                        PRs are welcome to add the new release (and merge all the 18 minor releases).
                                                                                                                                                                                                                                                                                                                                                                      • 7 months ago
                                                                                                                                                                                                                                                                                                                                                                        • 7 months ago
                                                                                                                                                                                                                                                                                                                                                                          • 7 months ago
                                                                                                                                                                                                                                                                                                                                                                            • 7 months ago
                                                                                                                                                                                                                                                                                                                                                                              • 7 months ago
                                                                                                                                                                                                                                                                                                                                                                                • 7 months ago
                                                                                                                                                                                                                                                                                                                                                                                  • 7 months ago
                                                                                                                                                                                                                                                                                                                                                                                    • tuan 7 months ago
                                                                                                                                                                                                                                                                                                                                                                                      Is it possible to build useActionState hook based on existing built-in hooks ? If yes, why does that hook have to be built in ?
                                                                                                                                                                                                                                                                                                                                                                                      • bogdan 7 months ago
                                                                                                                                                                                                                                                                                                                                                                                        The same reason useMemo exists
                                                                                                                                                                                                                                                                                                                                                                                      • rkwz 7 months ago
                                                                                                                                                                                                                                                                                                                                                                                        Curious, has anyone tried to use React without bundler like webpack, esbuild etc?
                                                                                                                                                                                                                                                                                                                                                                                        • preommr 7 months ago
                                                                                                                                                                                                                                                                                                                                                                                          Updates like this are exactly why React sucks.

                                                                                                                                                                                                                                                                                                                                                                                          If you're going to add something to the main project, it should be well-designed, clear, and in good taste. React won over things like Angular because the latter had poorly designed abstractions. It was supposed to be "just javascript" (which was always more of a vibe being actually true).

                                                                                                                                                                                                                                                                                                                                                                                          Just look at wtf actions are. In their blogpost[0], the old way of doing things is only a few lines more, but is much clearer. The 'useTransition' still has to update the error state - but at least it saves you from typing the pending state!

                                                                                                                                                                                                                                                                                                                                                                                          But of course, you're not supposed to use this directly, you're supposed to use useActionState. And this blog post makes it's usage very clear by just returning null to show something that's supposed to update state. So very clear, and intuitive /s

                                                                                                                                                                                                                                                                                                                                                                                          Stuff like this really should've been in a separate library. It baffles my mind that core behavior like state management is left to external solutions, but then random crap like this makes it into the main project.

                                                                                                                                                                                                                                                                                                                                                                                          [0]https://react.dev/blog/2024/12/05/react-19#actions

                                                                                                                                                                                                                                                                                                                                                                                          • wackget 7 months ago
                                                                                                                                                                                                                                                                                                                                                                                            > the old way of doing things is only a few lines more, but is much clearer

                                                                                                                                                                                                                                                                                                                                                                                            A description fit for React itself.

                                                                                                                                                                                                                                                                                                                                                                                            • foretop_yardarm 7 months ago
                                                                                                                                                                                                                                                                                                                                                                                              It would have been a different story if these features had shipped a few years ago but react query is definitely the elephant in the room here.
                                                                                                                                                                                                                                                                                                                                                                                            • rizky05 7 months ago
                                                                                                                                                                                                                                                                                                                                                                                              [dead]
                                                                                                                                                                                                                                                                                                                                                                                              • wetpaws 7 months ago
                                                                                                                                                                                                                                                                                                                                                                                                [dead]
                                                                                                                                                                                                                                                                                                                                                                                                • lucsky 7 months ago
                                                                                                                                                                                                                                                                                                                                                                                                  [flagged]
                                                                                                                                                                                                                                                                                                                                                                                                  • sunshinerag 7 months ago
                                                                                                                                                                                                                                                                                                                                                                                                    [flagged]
                                                                                                                                                                                                                                                                                                                                                                                                    • xandrius 7 months ago
                                                                                                                                                                                                                                                                                                                                                                                                      Legacy?

                                                                                                                                                                                                                                                                                                                                                                                                      Is writing pure ASM the modern way now?

                                                                                                                                                                                                                                                                                                                                                                                                      • esperent 7 months ago
                                                                                                                                                                                                                                                                                                                                                                                                        There was a dumb hot take blog post here a week or so ago by some wannabe thought leader trying to cast React as "legacy" and meanwhile telling everybody about the "right" way to do frontend. I guess it got through to a few people. To me it felt like reading a tweet that somehow got expanded to 3000 words.