Live data from Hacker News

Why I don't miss React: a story about using the platform

jackfranklin.co.uk

101–110 of 279 posts

Re: Why I don't miss React: a story about using the platform

#101
post #97
post #93

Earlier quoted context omitted.

I said no such thing.

You implied it. What you should have alluded to is that it is necessary to use technologies today that won’t necessarily be in use in the future, merely as a stepping stone to get us to the next destination, where we will use a new but still temporary technology.

As Scott Adams says, "Analogies are for fighting." If you try to counter a statement with an analogy you almost always simply get a fight.

Re: Why I don't miss React: a story about using the platform

#102
post #84

Earlier quoted context omitted.

And jQuery is still used in lots of places without any problems AFAIK. Even if the React development team would stop the framework will for sure be around for a couple more years and receive at least security patches.

jQuery has faded into the background, no longer interesting. React has too many sharp edges, it'll only be here until something shinier supercedes it.

Does React itself have edges, or do your issues derive from other parts of the ecosystem (Redux, styled-components, MobX, whatever)?

Re: Why I don't miss React: a story about using the platform

#103

Earlier quoted context omitted.

I think react sits really well with some people, and with others it doesn't. For me I find I have to fight against the platform to separate presentation from behaviour. And let's not kid ourselves, a lot of react code bases do the classic winforms mistake of having an essentially code behind architecture.

And why was that a mistake?

IME marrying business logic so closely to presentation makes it very hard to change one without the other. Especially relevant for web apps, where you may want to re-use business logic for mobile apps, which becomes very difficult when they're tied to a react component.

Also makes it harder to test. There's a great paper called "Naked Objects" which I'd recommend for anyone doing GUIs, but powerful idea I got from it is make your presentation code so immediately obvious from your business objects that you can practically generate it automatically.

Re: Why I don't miss React: a story about using the platform

#104
post #39
post #23

Earlier quoted context omitted.

I wrote my own React components using D3 to do the underlying math but setting up my own DOM rendering. It's ok, my thoughts Pros: * I have generic "zoom/pan" implemented. I did this by making a generic ChartContainer with 5 zones - top, right, bottom, left, content - and you specify just the size of the non-content zones (if displaying them at all) and otherwise it behaves responsively (i.e. CSS style on the contain…

I also went this route and used d3 for the math but my own hand-made SVGs for the rendering so that the DOM is all in "react land". You may want to check out this library: https://airbnb.io/visx/ They converted a ton of d3 features into proper React components

I’m a huge fan of visx after discovering it a few years ago. I recently needed to create a custom line chart and looked into numerous React-based libraries but none fit exactly what I wanted, so I went back to visx again. It requires more planning, but the results you can get (just like with d3) are incredible.

Re: Why I don't miss React: a story about using the platform

#105
post #11

> But the web platform isn't perfect, and I suspect most React developers have come across a situation where you’d love to be able to just tweak how your component is being rendered. Honestly, I haven't. The only potential caveat I can think of is when you have some non-reactive legacy code you want to embed inside a React component... but even then React's escape hatches are more than sufficient. If you're really wo…

React doesn’t offer any render optimizations by default, so not worrying about it sounds like blissful ignorance - you’re just ignoring a ton of unnecessary renders because they don’t visibly affect performance (on your development device). After a certain level of complexity the issues will start to show.

React offers tons of optimizations for not re-rendering. useEffect, useMemo, useCallback.

Re: Why I don't miss React: a story about using the platform

#106
post #30

Come on over rovers: https://github.com/cheatcode/joystick . I promise you'll love it if you're switching from React (pure HTML, CSS, and JavaScript w/ minimal abstraction). And it's full-stack so no more stitching together frankenstacks. Good ol' isomorphic JS for devs who value their time/productivity.

Hard to say it's a good sell coming from React when the component API has been twice-replaced by better options in the React world. This looks awfully tedious to use.

Re: Why I don't miss React: a story about using the platform

#108
post #84

Earlier quoted context omitted.

jQuery has faded into the background, no longer interesting. React has too many sharp edges, it'll only be here until something shinier supercedes it.

> jQuery has faded into the background, no longer interesting. It’s a mature, stable technology, still in wide use - and not really a competitor with react. That you claim it’s “no longer interesting” says more about your own preferences and ironically makes it sound that you are personally interested in the newest shiny fads - so I’m confused, what is your objection to react then? Angular isn’t exactly dead - and is…

Never said I wasn't partial to shiny.

Re: Why I don't miss React: a story about using the platform

#109
post #88
post #78

Earlier quoted context omitted.

> The library has a gigantic developer share.. So did jQuery, and that google framework used to create Gmail, what was it called? Oh yeah, nobody cares anymore because they're irrelevant in 2022.

> jQuery I still see it on resumes today. > that google framework Seriously, Google stuff is infamous for being smothered by Google itself, what's your point > nobody cares anymore Literally the only non-Google example you could think of is still popular. But jQuery wasn't a graceful idea with a strong implementation, it was a wrapper to alleviate the pain of browser APIs. React is a wrapper to alleviate the pain of…

I'm not a frontend expert, please forgive me.

Re: Why I don't miss React: a story about using the platform

#110
post #102
post #84

Earlier quoted context omitted.

jQuery has faded into the background, no longer interesting. React has too many sharp edges, it'll only be here until something shinier supercedes it.

Does React itself have edges, or do your issues derive from other parts of the ecosystem (Redux, styled-components, MobX, whatever)?

React has edges. Hooks are an anti-pattern with all kinds of footguns. Suspense is also a crazy anti-pattern by literally throwing and catching errors as a means for communicating between parts of the framework.

And this isn't an issue of me not understanding React or hooks, I would consider myself to be as expertly acquainted with hooks as it's possible to be.

Now, do I still use React for everything? Yes. Do I prefer hooks to class components? Also, yes.

Post reply on HN