Hacker News new | past | comments | ask | show | jobs | submit login

Comparing a view library to a full front-end framework feels...weird. Even granting this stretch, it makes bizarre claims:

> Goal: Add modern interactivity features directly in HTML vs Provide a component-based, full-featured UI JavaScript library

Ah, no. Anyone who's used React.js should know otherwise. React is a declarative view library. It doesn't even handle routing or app state management, let alone the requirements for a "full-featured UI."

> [React] Features: [...] one-way data binding, state management

These statements are between "weirdly put" to "outright wrong."

> Learning curve: [Htmx] Gentle v. [React] Steep

React is dead simple. Your `HelloWorld = () => <button onClick={console.log}>Hello!</button>`. The learning front-end development can certainly be steep, but React is light-years away from kitchen sink frameworks that have you fiddling with yet another templating engine, controller classes, etc.

> React: A full-featured JavaScript library for building user interfaces based on reusable components written in JSX

This conflates React, ReactDOM, and JSX.

> Because of its unique approach to web development, React has a steep learning curve. Before building your first React application, you need to understand the concepts of SPA (Single Page Application), Virtual DOM, JSX, state management, props, re-renders, and more. This may overwhelm some beginners.

You don't need literally any of this aside from `props`. If you do use JSX, then its syntax will feel far more familiar than `hx-get` or whatever.

> SPA applications built in React usually contain a lot of JavaScript. That results in higher network utilization and client-side rendering times.

This conflates React with frameworks like Create React App. It ignores alternatives with SSR like Next.js. Also: don't encourage people to make more SPAs with React. Please.




> It doesn't even handle routing or app state management

Doesn't it? [1]

> another templating engine, controller classes, etc.

Template engines are easier than React, considering it's generally as easy as {{ and }} inside html.

Controller classes? It's as simple as print('<html><button>Hello!</button></html>')!

> If you do use JSX, then its syntax will feel far more familiar than `hx-get` or whatever.

Definitely not. Few attributes is a lot easier than JSX.

[1] - https://react.dev/learn/managing-state




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: