Skip to content

Replace React.js components with HTMX #1674

@rafalp

Description

@rafalp

HTMX is a tiny library that lets developers specify parts of HTML as dynamic islands that can be swapped by new server-rendered HTML on interaction.

This approach is a declarative way to doing $.get("/url/", ".outlet") of the yore times. Interactivity may not be as amazing as what React.js offers, but:

  • Its much smaller (15.4kb after gzip).
  • Final JS is much smaller (we only need to cover things like dynamic timestamps, Bootstrap's JS for modals/dropdowns, quote and message editor).
  • UI is interactive faster on page load.
  • Much more UI can work without JS
  • Single HTML location (Django's templates)
  • Much easier to work with for Django devs
  • Much easier to manipulate and extend with plugins
  • Can be done incrementally (move page after page away from React.js)

Forum thread for discussion:

Removing React.js from the codebase and adapting HTMX for UI interactivity

Metadata

Metadata

Assignees

Labels

area: backendThis issue involves Python, Django or dependency (eg. database)area: frontendThis issue involves JavaScript, React.js and Nodefuture architecture

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions