Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace React.js components with HTMX #1674

Open
rafalp opened this issue Dec 5, 2023 · 3 comments
Open

Replace React.js components with HTMX #1674

rafalp opened this issue Dec 5, 2023 · 3 comments
Assignees
Labels
area: backend This issue involves Python, Django or dependency (eg. database) area: frontend This issue involves JavaScript, React.js and Node future architecture

Comments

@rafalp
Copy link
Owner

rafalp commented Dec 5, 2023

HTMX is a tiny library that lets developers to specify parts of HTML as a 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

@rafalp rafalp added area: frontend This issue involves JavaScript, React.js and Node area: backend This issue involves Python, Django or dependency (eg. database) future architecture labels Dec 5, 2023
@rafalp rafalp self-assigned this Dec 5, 2023
@frankwanicka
Copy link

This is a much better solution IMO than going full React. Web dev is currently swinging back towards server-side rendering. The interactivity provided by HTMX is plenty for this type of app.

@rafalp
Copy link
Owner Author

rafalp commented Dec 12, 2023

Forum thread for discussion:

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

@rafalp
Copy link
Owner Author

rafalp commented Dec 13, 2023

I've created a ton of "Remove React.js from..." tasks.

In next release I will remove React.js from categories (#1683) because that one is easiest to do.

After that I'll prioritize, in this order:

I would like to ship Misago 0.40 with new permissions system and the above. It may take a while to get done, but it will open the floodgates to many improvements in what are key parts of the forum.

This was referenced Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: backend This issue involves Python, Django or dependency (eg. database) area: frontend This issue involves JavaScript, React.js and Node future architecture
Projects
Development

No branches or pull requests

2 participants