|
|
|
|
|
by ZephyrBlu
1212 days ago
|
|
Modelling your frontend as a bunch of reusable components is a big benefit of frameworks. I think it's hard to go half and half with frontend component and backend templating though. Managing any (Literally any) client-side state is also easier with a framework. I'd rather use Preact than write vanilla JS for basic state management. |
|
I've heard this before, and just don't get it. I have, can, and do create view "components" in both Django and Jinja2. They're just templates. Templates that get included in other templates. I've never (never) got to a point where I thought "darn, I want to abstract out this foo thing as a component, but can't". When I really want front end interactivity - like charts - then I'll use a JS library or a web component. With htmx, I can even do partial page updates.
None of that requires the very significant overhead that React/Angular/whatever bring.
>I'd rather use Preact than write vanilla JS for basic state management.
I'd rather use the backend. Because it owns the state, and cache invalidation is one of the two hard things [0].
[0]: https://www.martinfowler.com/bliki/TwoHardThings.html