gofiber / contrib

🧬 Repository for third party middlewares with dependencies
https://docs.gofiber.io/contrib/
MIT License
198 stars 102 forks source link

🚀 [Feature]: HTMX component #679

Open gedw99 opened 1 year ago

gedw99 commented 1 year ago

Feature Description

htmx allows backend devs to build html based GUI using https://github.com/gofiber/template and then updating the html i the browser.

The core concept with HTMX is that you update the GUI from the backend sending html that then replaces a target html DOM. Its highly productive and fast. Then you do not need React, Vue and all those complex gui libs.

Visual Demo

You can see running examples here with source code: https://htmx.org/examples/

Golang examples

Here are a few golang examples:

https://github.com/donseba/go-htmx

https://github.com/livefir/fir

All you need is to include one js in your html page.

Additional Context (optional)

htmx (and hyperscript, alpinejs) too.

Code Snippet (optional)

Checklist:

gedw99 commented 11 months ago

https://github.com/rngallen/gohtmx/tree/main is a Fiber project using htmx.

gedw99 commented 8 months ago

There are quite a few Fiber projects using htmx.

SSE tends to be the favoured way to send a notification to them cause a rewrite of sone html too .

luisgarciaalanis commented 3 months ago

I think the router might not be compatible with HTMX. you need to be able to compose routes and render partial nested page fragments when doing full page reloads, and if the htmx header is present only send the last page fragment (for htmx to handle the gluing on the browser). IDK of any go library/framework that is able to do this.