top | item 35882288

(no title)

ajd1988 | 2 years ago

The idea of using Go and Alpine.js together for building reactive web apps seems promising. As you mentioned, Fir is targeting devs with moderate HTML/CSS & JS skills.

How does Fir handle more complex scenarios such as nested components, handling form submissions with client-side validation, and integrating third-party APIs or libraries?

Does the toolkit offer any built-in functionality or guidelines for handling these cases, or is the developer expected to handle them using custom code and Alpine.js plugins?

Also the site is super slow!

discuss

order

realrocker|2 years ago

This example has most of the scenarios you have called out: https://github.com/livefir/fir/tree/main/examples/fira. Fir aims to limit itself to rendering templates on the server and making it available for all subscribers as a browser CustomEvent which is consumed by alpine.js for more complex interactivity. The expectation is the that the developer handles it via either alpine.js plugins or standard JS code.

[edit] This is still a work-in-progress so I will certainly add better guides and documentation moving forward. Although its good to get feedback that this approach might be interesting for at least some people.

Art9681|2 years ago

I think this is adding unnecessary complexity. One of the reasons developers gravitate towards a framework like Alpine or HTMX is to write less JS and go back to enjoying HTML. Of course there are a lot of use cases that require custom JS scripting. But bootstrapping a project with another Go web framework and adding Alpine is also trivial. But keep going and follow your vision. I love these types of projects. Check this one out:

https://pushup.adhoc.dev

It's got some unique ideas.