Live data from Hacker News

Htmx vs. React: A Complete Comparison – Semaphore

semaphoreci.com

11–20 of 88 posts

Re: Htmx vs. React: A Complete Comparison – Semaphore

#12

As a backend engineer I Still haven’t managed to learn how react data management or JSX works. Every time I try to dive into it I get a strong migraine. I hope something easier comes popular before I would need to learn FE

Have you looked at htmx? Or even full vanilla?

htmx better i generally just use vanilla or jquery, htmx it's still bearable

Re: Htmx vs. React: A Complete Comparison – Semaphore

#13

As a backend engineer I Still haven’t managed to learn how react data management or JSX works. Every time I try to dive into it I get a strong migraine. I hope something easier comes popular before I would need to learn FE

JSX is just one-to-one syntactic sugar for a createElement call (https://react.dev/reference/react/createElement). You don't even need to use it with React, any library that defines an identical function interface will do.

Re: Htmx vs. React: A Complete Comparison – Semaphore

#14

As a backend engineer I Still haven’t managed to learn how react data management or JSX works. Every time I try to dive into it I get a strong migraine. I hope something easier comes popular before I would need to learn FE

JSX is just one-to-one syntactic sugar for a createElement call ( https://react.dev/reference/react/createElement ). You don't even need to use it with React, any library that defines an identical function interface will do.

i just struggle with hooks, data management, how data flows in between components etc etc

Re: Htmx vs. React: A Complete Comparison – Semaphore

#15

As a backend engineer I Still haven’t managed to learn how react data management or JSX works. Every time I try to dive into it I get a strong migraine. I hope something easier comes popular before I would need to learn FE

I'm not a frontend guy but everything seems more complicated by the fact that Object.observe[0] was ditched. Although there are good arguments against it.

[0] - https://caniuse.com/object-observe

[1] - https://www.bitovi.com/blog/long-live-es6-proxies

Re: Htmx vs. React: A Complete Comparison – Semaphore

#16
post #7
post #6

React weight 6.4 kB? In which universe? React-dom alone is 42kB gzip. https://bundlephobia.com/package/react-dom

Preact is 3kb and works as a drop in replacement for React (most of the time). It's also way faster.

Similar to how the size of react without accounting for react-dom is deceptive, one is also unlikely to use preact without @preact/hooks and/or @preact/signals which increases the size somewhat. Still much, MUCH smaller than react though.

Re: Htmx vs. React: A Complete Comparison – Semaphore

#18

As a backend engineer I Still haven’t managed to learn how react data management or JSX works. Every time I try to dive into it I get a strong migraine. I hope something easier comes popular before I would need to learn FE

Most frontend engineers don't actually know how it works either, if it makes you feel any better.

Re: Htmx vs. React: A Complete Comparison – Semaphore

#19
post #3

We've been using Turbo for over a year now (similar idea to Htmx). Pretty happy not to be using React anymore. Most of the complexity is offloaded to the backend where we can handle it better with a typed language system and no middle layer (e.g. GraphQL) between our app and the database. TypeScript is not typed fwiw, e.g. `as any`.

> TypeScript is not typed fwiw, e.g. `as any`.

So because it has a feature to disable typing it is not typed? Would you say the same thing for any language that has similar "unsafe" flags, like rust or basically all the others?

Post reply on HN