Misago Forum Drops React.js, Adopts HTMX for UI

Original: Removing React.js from the codebase and adapting Htmx for UI interactivity (2023)

Why This Matters

Signals a broader industry reassessment of JavaScript-heavy frontends in favor of server-side rendering with lightweight interactivity tools.

Misago project lead rafalp announced in December 2023 plans to remove React.js from the forum codebase and replace it with HTMX, a lightweight library enabling server-rendered HTML interactivity without a full JavaScript framework.

Misago project lead rafalp outlined a significant architectural shift in a December 12, 2023 forum post: removing React.js from the Django-based forum platform and adopting HTMX for UI interactivity.

The current architecture renders pages twice — once via Django templates for initial HTML, then again via React.js components that replace most of that HTML after JavaScript loads. This causes several issues: duplicate template maintenance, confusion for theme customizers, duplicated translation files in both django.po and djangojs.po, slower response generation due to JSON pre-serialization, and performance degradation on older mobile devices.

Two alternative all-JS approaches were considered — a full React.js SPA with API, or server-side rendering with Next.js or Remix — but were rejected in favor of a server-first model.

HTMX was selected as the solution. It is a small JavaScript library that marks specific HTML sections as dynamic 'islands' that can be refreshed with new server-rendered HTML on user interaction, without writing custom JavaScript or JSON serializers. The Django backend would return partial HTML only when an HTMX request is detected, eliminating the need for a separate API layer. This reduces complexity for both core developers and plugin authors, who currently must implement both Django templates and React.js components.

Source

misago-project.org — Read original →