Viewing profile — imacrayon
imacrayon
HN member- Joined
- Fri, Jan 13, 2023, 9:36 PM UTC
- HN karma
- 52
- Public activity
- 26 items
- HN profile
- View on Hacker News ↗
About imacrayon
github.com/imacrayon twitter.com/ima_crayon
Recent public activity
-
comment
Comment #45541911
You can swap multiple elements with targeting too: `x-target="comments comments_count"`, but, yeah most of the time `x-sync` is better.
-
comment
Comment #45265204
This is the way. https://alpine-ajax.js.org provides what’s missing from HTMX.
-
comment
Comment #42624536
You made my day! thanks
-
comment
Comment #42618140
This is one reason I created https://alpine-ajax.js.org . A few years ago there were a lot of examples in the HTMX documentation that discouraged accessibility and progressive enha…
-
comment
Comment #41689223
I actually created https://alpine-ajax.js.org for this reason. HTMX and Hotwire both have opinionated requirements around the content and status codes that your server returns. One…
-
comment
Comment #41688587
There’s a draft proposal to get some of HTMX in the browser: https://github.com/alexpetros/triptych
-
comment
Comment #41494078
Help me understand why you need the JSON in these examples…You’re rendering JSON data on the frontend just to transform it into HTML. The HTML is rendered server-side, so you shoul…
-
comment
Comment #41484778
Check out https://alpine-ajax.js.org it defaults to using the same template views you would in a typical JavaScript-less app, then you can sprinkle in fragments where you need to o…
-
comment
Comment #41257242
You can use https://alpine-ajax.js.org for this, or Alpine can work as an alternative to Stimulus.js in the Hotwire stack.
-
comment
Comment #41225972
There's some momentum around getting core HTMX functionality into the HTML spec so JS might not be required: https://www.reddit.com/r/htmx/comments/1ehjw7v/comment/lg09w...
-
comment
Comment #41060430
Alpine + Alpine AJAX. It's lighter than Alpine + HTMX and it doesn't require splitting your templates up into partials.
-
comment
Comment #41024734
Eleventy. It’s a static site generator that’s super stable, they take backwards compatibility very seriously so you can count on it for a long time. It’s lightweight so you don’t h…
-
comment
Comment #40995504
I had a similar experience, so I took the stuff I liked from HTMX and made it into an Alpine plugin: https://alpine-ajax.js.org
-
comment
Comment #40558641
Oh, absolutely :) I try to keep up on Slack, but I need to get back to going to the in-person events again. It’d be cool to reconnect there sometime!
-
comment
Comment #40556105
I’m impressed with how thorough this is! It’s cool insight into the dev conference experience.
-
comment
Comment #39595330
Yeah, Alpine components have `x-init` that works just like the load trigger. You can fire off an AJAX request inside that directive, there's an example here: https://alpine-ajax.js…
-
comment
Comment #39594456
Whatever floats your boat...I wish it supported comments though.
-
comment
Comment #39594436
It does a full page reload at the moment. I'm about to start work on a full SPA mode that will function more like Turbo though.
-
comment
Comment #39592239
Thank you! I really have tried to sweat those details, it's reassuring to hear that's coming through.
-
comment
Comment #39590785
Yes! You’ve reminded me that there’s some subtle gotchas when using HTMX server-side that are probably worth documenting too. For one, HTMX starts with the assumption that you’re r…
-
comment
Comment #39589947
HTMX actually has a good essay on the scale question: https://htmx.org/essays/does-hypermedia-scale/
-
comment
Comment #39589919
Haha you’re not wrong. I love jQuery, but Alpine’s declarative style feels better, and since we don’t have to worry about all the backwards compat we get a library that’s half the …
-
story
Show HN: Alpine Ajax – If Htmx and Alpine.js Had a Baby
An Alpine.js plugin that includes the core functionality of HTMX in a streamlined (3KB) API.
-
comment
Comment #34375038
Nothing, if it works for you great! I’ve found Alpine code to be more declarative and easier to reason about. Also, jQuery often requires you to write more code to do the exact sam…
-
comment
Comment #34374914
Chances are you’ll end up writing more than 10kb of custom JS to make your components work. Alpine comes with basic batteries already included.