Hacker News new | ask | show | jobs
by ajd1988 1139 days 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!

1 comments

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.

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.

Hey. I have checked out pushup before. Its great. I guess I am taking a niche approach which not many would find useful. To clarify: What is adding more complexity? alpinejs ?