Earlier quoted context omitted.
What code are you using to reactively render state? Or do you write all DOM manipulations manually and just accept the problem of state explosion ?
Here is an example: /lib/dashboard/dashboard_script.ts https://github.com/prettydiff/webserver When you aren’t using framework like components state restoration is a single function that runs only on page load. There is no state explosion and on localhost the SPA fully renders and finishes state restoration in about 105ms from http request.
React is winning by default and slowing innovation
661–670 of 866 posts
Re: React is winning by default and slowing innovation
#662Re: React is winning by default and slowing innovation
#663Earlier quoted context omitted.
If React implodes because of bad architectural decisions, Vite should fork it. It's crazy that the best React DX is provided through Vue's community projects.
Why don’t we just switch over to Vue? If DX is such a driver for deciding to use a web framework, Vue kicks React’s ass, and that’s just objectively speaking.
Re: React is winning by default and slowing innovation
#664Earlier quoted context omitted.
> 5 straightforward hooks `useEffect` is straightforward? Cloudflare recently (like, literally 4 days ago)[1] had a pretty big outage because of the improper use of `useEffect` (surprise, surprise, it was the dependency array), a hook so infamous if you search "When should I use `useEffect`" you'll get approximately 9 trillion hits, with nearly all of them telling you something different, including Dan Abramov himsel…
Well, that is really embarrassing for Cloudflare... A recursion in a side-effect via dependencies is a rookie mistake, it's hard to imagine it could slip into production with a proper due process. Maybe they should stop vibe-coding and deploying things to production without any tests or review?
Re: React is winning by default and slowing innovation
#665Earlier quoted context omitted.
No OP, but I've also used Angular, React, Vue, Solid and Svelte in real world projects and my default choice is Vue, because it's on par with Solid and Svelte (and with Vue Vapor those three are basically the same) but with the larger ecosystem (vuerouter, vueuse, nuxt, nuxt-ui, primevue, nuxt-content, ...). I must also say that React was by far the most unpleasant and unproductive to use.
I keep reading unpleasant without any arguments. React is simple by nature, what made it unpleasant and unproductive? Granted I mostly do work on Shopify apps, so most of the heavy work has been done for me, I just put components together. This works fine, and I'd rather do this in React than e.g. Angular due to the small scale of the apps. Then again web components would've also been fine.
- infinite loop due to re-rendering on the render function (it happens every single time i come back to react) - using useEffect when not required - nested object updates (dunno if this is still an issue) - class vs whatever the name is (className?)
Overall as another comment said I feel more fighting against react pitfalls than focusing on my application's logic. That really takes a toll in productivity as part of your brain loses a small portion of 'RAM'/cognitive load as you need to make an active effort to not shoot yourself in the foot. I guess most people get used to it, but for me it just never clicks knowing there are similarly performant frameworks with way more friendly APIs.
Re: React is winning by default and slowing innovation
#666I feel this with every fiber of my being. I used to do a TON of front-end work, some of it quite cutting edge, delivering highly performant user experiences in the browser that had previously been only thought possible in a native app. Back in like 2009-2015. I was deeply connected with the web standards fundamentals and how to leverage them mostly directly. I detoured into heavier focus on backend work for quite a w…
> Yet I still have to begrudgingly use React in several contexts because of the industry-wide inertia, and I really wish I didn't have to. I think you'll find a lot of people begrudgingly have to work and really wish they didn't have to. That means using what they know, which means React. Which I totally get. People want to spend time with their kids, hobbies etc. Worst case, they might be caring for others, like the…
Re: React is winning by default and slowing innovation
#667Re: React is winning by default and slowing innovation
#668> React didn’t win purely on technical merit A sentence written by someone who clearly hasn't worked on a large Angular 1.x project.
Yes, this is probably the wrongest statement. When React was launched, it was one in a pool of thousands of web frameworks. For any axis you want to claim that React won by "default", there was another framework that dominated React in that axis and lost anyways. Some frameworks had more resources and lost (Angular), some of which were more popular and lost (jQuery, Backbone), and some of which were even more hyped t…
Don't forget about having a migration path. I don't know how common it was (or how messy it might be, I never did this myself), but before Redux became popular, people were using Backbone models as the datastore for React. So existing Backbone-based apps had a way to piecemeal migrate to React.
Re: React is winning by default and slowing innovation
#669Earlier quoted context omitted.
What code are you using to reactively render state? Or do you write all DOM manipulations manually and just accept the problem of state explosion ?
Here is an example: /lib/dashboard/dashboard_script.ts https://github.com/prettydiff/webserver When you aren’t using framework like components state restoration is a single function that runs only on page load. There is no state explosion and on localhost the SPA fully renders and finishes state restoration in about 105ms from http request.
Re: React is winning by default and slowing innovation
#670I am fan of experimenting with different front end tooling, but when I was looking for a job a few years ago, I was explicitly told by one employer that I would have gotten the job if I had a couple of more years experience with react. And the interview wasn't even focused on react, it was mostly js and front end fundamentals.
If you can't look at a front-end component and grab the code, and pop it in literally anywhere else on your website, then you are doing React wrong, component driven development is insanely the best part of React that I dont know if people talk more about (I have not done React in a while).