Live data from Hacker News

Does anybody like React?

jsx.lol

291–300 of 353 posts

Re: Does anybody like React?

#291
post #179

Earlier quoted context omitted.

Flutter, SwiftUI, Jetpack Compose: a whole lot of other platforms have been implementing React as their UI framework

No they are implementing Functional Reactive Programming, it isn't the same thing, even though common folks would say React. https://wiki.haskell.org/Functional_Reactive_Programming

Isn't FRP more like RxJS/CycleJS?

If you ask the people who work on any of those frameworks I mentioned, they'll tell you they're taking the React style and applying it to their platforms.

Re: Does anybody like React?

#292

Earlier quoted context omitted.

Have you used Svelte? I can’t see why anyone would like React more. The only upside I think react has it’s the IBM of frontend. No one has been fired for choosing React.

Svelte is cool although I didn't have some big epiphany. I'm not going to use Svelte because "it compiles" and "is faster" when my existing React app performs very well. Plus there are some libraries for my specific use case that didn't exist in Svelte. I know people love things besides React, and I would be happy to see it unseated. Sure I'm part of the problem but it's been good to me and I have bigger fish to fry.

> Plus there are some libraries for my specific use case that didn't exist in Svelte.

A lot of these libraries aren't needed in Svelte because 1) the functionality might already be built into Svelte, and 2) you can use any JavaScript library directly, unlike in React where you often need a React-specific wrapper.

Not saying that applies to your specific use case, but I've seen this argument way too many times.

Re: Does anybody like React?

#294
I really like Svelte and have been using SvelteKit for more complex apps.

I've found it to be a great improvement over many cases where I would have used React before.

Svelte feels much easier to learn for someone who already knows the basics of web development, HTML, CSS, and JavaScript. But nowadays I often see people start learning web development by learning React, which feels a bit backwards.

Personally I have been using SvelteKit + Capacitor to build mobile apps, wrote about the setup here: https://bryanhogan.com/blog/web-to-app-sveltekit-capacitor

For simple landing pages I like to use Astro though.

Re: Does anybody like React?

#295

No, I prefer much lighter frameworks that are closer to web standards, such as LitElement, which is a relatively light wrapper around Web Component standards. yes, they are slightly clunky, but they work great without a build step. I just edit the code and reload the page, no need to worry about a 5MB bundle. Unless you are writing code that is deployed to a million users running on Nokia brick phone browsers, it wor…

Another vote for Lit here.

JS frameworks were invented to deal with clunkiness of Vanilla Javascript and got bloated to include everything and the kitchen sink. All of a sudden they're 'ecosystems'.

Modern JS + Web components with the light layer of Lit on top solve at least 80% of the issues there were and are with just plain JS. Close to actual web standards and thus play nice with almost everything. By design they fit into a far more modular approach than React or Vue or Svelte.

Re: Does anybody like React?

#296
My company is currently using PHP templates, but is thinking of replacing them with react components because the new front-end devs like them. Is this a bad idea?

Re: Does anybody like React?

#297

Earlier quoted context omitted.

JSX is a very thin layer of templating logic inside JS. Meaning you have all the language features available while templating. Some arbitrary JS can result in templating. Vue's DSL is whatever language the developer implemented. Which is probably not enough, depends how much effort they put into it and how good they are in language design. Given that they cargo cult HTML tags to organize components in a pseudo-famili…

While I understand the advantage of using the built-in language features (and I know why it is required to be done that way), I still think using {enable && } for conditional rendering, or {collection.map(x => } for looping are not the most obvious choices. If you ask people how conditionals and loops are written in JS, you will get 'if' and 'for' or variants of 'while'. So I get where the v-if and v-for are coming f…

Me personally, I prefer these more functional (and more succinct) expressions. For loops are overly verbose, and not as composable. But then again, I'm a Lisp programmer.

Re: Does anybody like React?

#298
post #243

Earlier quoted context omitted.

XML, XMLHttpRequest, and XSLT in IE 5 was peak web dev for me. Never been more productive.

This feels like the equivalent of "whatever music you liked at 16 defines your taste"

I suppose. And I'm not at all saying there's nothing better today, or that it would be possible to build today's web apps using that stack. Just at that point in time and with those technologies everything was clicking.

Re: Does anybody like React?

#299

I really like Svelte and have been using SvelteKit for more complex apps. I've found it to be a great improvement over many cases where I would have used React before. Svelte feels much easier to learn for someone who already knows the basics of web development, HTML, CSS, and JavaScript. But nowadays I often see people start learning web development by learning React, which feels a bit backwards. Personally I have b…

Svelte + Astro is the combo for me - this combo is great for documentation sites and pages w/ selective amounts of interactivity
Post reply on HN