What does HackerNews think of django-components?
Create simple reusable template components in Django.
Language:
HTML
#11
in
Django
The same can be said of a React frontend that talks to a JSON API. There is some structure, organization, and convention to the API endpoints, one-way data flow, and so on. Otherwise it’s chaos.
On our most recent project we do the same with Django and HTMX. Organized endpoints by component. Composable, reusable server-side components with django-components [1]. And we’ve been orders of magnitude more productive, shipping more in 1-2 months than we did the previous 12-18 months working with React.
I had used this project for creating components https://github.com/EmilStenstrom/django-components/
Also, for simpler cases I include partial templates.
Maybe django-components, if you need something a bit higher level than plain include or inclusion tags: