Hacker News new | ask | show | jobs
by Epskampie 514 days ago
I'm a freelance webdev with 15 years of experience, and recently I've made some new projects with Symfony Stimulus & Turbo to great success.

A few thoughts:

I tried just htmx too, too limiting. Stimulus/Turbo combination is much better.

Use the right tool for the job. Highly interactive app, like an editor? Use react or similar js framework. Mostly page/document website? A backend framework is much faster and easier to develop, and much simpler to test.

Use what you know yada yada.

1 comments

A blend of both? Drop in a React component where needed on a given page! People forget (me included) that even React can be mounted into a single DOM element.

With all this framework nonsense its hard to forget at the end of the days its all just javascript.

If you're doing something something reasonably small, using preact rather than react and then wrapping it into a web component so you can just ... put it in there ... is a really nice option to have.

(it may not be the right option in any given case, but it's worth knowing it's there even so)

Preact is definitely a good choice if you're looking for something lightweight. React-dom was already relatively hefty, and seems to have gotten even larger in version 19. Upgrading the React TypeScript Vite starter template from 18 to 19 increases the bundle size from 144kB to 186kB on my machine [1][2]. They've also packaged it in a way that's hard to analyze with sites like bundlephobia.com and pkg-size.dev.

[1] https://github.com/facebook/react/issues/27824

[2] https://github.com/facebook/react/issues/29913