HTMX: The Game-Changing Alternative to React

preview_player
Показать описание
HTMX is cool and all, but how far can it go? Can it do streaming AI responses? Let's find out. It might be a lot easier than you think!

0:00 Intro
1:09 Project Introduction
2:02 Posting With HTMX
3:15 Converting Astro to SSR
3:48 Creating The Request Cycle
5:00 Building A Request Manager
6:38 Supporting Requests In The UI
7:39 Connecting To OpenAI
9:27 Cleansing Astro's Fragment Results
11:04 Now Using NextJS
12:28 HTMX XSS Concerns
12:59 Should React Devs Learn HTMX?
Рекомендации по теме
Комментарии
Автор

With HTMX and HyperScript (from the same guy that created HTMX) we went from Django + Django REST Framework + Vue, back to just Django. The built-in DTL (Django Template Language) can already serve 80% of our needs. HTMX and HyperScript covers the balance 20%,

FirdausAziz
Автор

what i like about htmx is that you do things like form validation only once since its all backend driven and where you have a dedicated frontend and dedicated api you mist essentially do validations twice, but with something like HTMX its essentially only once.

Christopher-lxud
Автор

This seems like a very interesting course correction from all the insane framework complexity we've convinced ourselves is necessary for everything.

ryanleemartin
Автор

This is the most complicated simple example for htmx I’ve seen so far.

marghidanu
Автор

pretty funny how web dev is slowly going full circle back to php and ajax 😂

jatFIVEFOURAA
Автор

Note: Nearly all PHP template engines today also auto-escape values. Using raw PHP as the template engine is not recommended these days, precisely for the security reasons you mention. 🙂

LarryGarfieldCrell
Автор

Very cool tutorial. @jherr I wonder if in this case an implementation with web sockets would have been good enough.

judostuff
Автор

Jack, hi there. Could I ask you what character you are using in your zsh prompt on the second line? (or series or characters?)

avi
Автор

I've been doing this for years, only with plain HTML. The only difference is that the server call uses some custom code inside HTMX instead of the browser native request mechanism that binds into the user's OS, which is much more efficient than a client-initiated request from HTML. Much more performance and maintainable than 99% of React and Angular Apps I've seen in the wild.

FagnerBrack
Автор

How does htmx help create microfrontends? does it support returning blocks of html that have a shadow dom and are fully styled without having to import for example tailwind in the container html?

RobertoFabrizi
Автор

Thank you for a very inspirational video. I wondered if the issue with the clean HTML response was only in development? I've heard reports that the responses clean up in production...? Thank you again. I've embraced this stack.

lifedrawing
Автор

which zsh theme are you using? looks really cool.

sujeet
Автор

What we really need is support for html documents partials natively on the browser. We’ll go back to old school full-ssr again 😂

mma
Автор

Super happy to see jack cover this topic 🌝

AustinJohnson-zvhy
Автор

Not only PHP needs sanitization; any other language like Python, Node.js, etc., requires sanitization as well. If you use a framework, you may already have built-in sanitization. So be careful with your choice of words.

Necessarius
Автор

Please share how you set your Terminal to look so good

MeditationRevolution
Автор

Hey jack ! I would like to know if you use any external terminal app or is it default mac terminal setup. I like it a lot. But I use windows. Please recommend me something like that..

laanithchouhan
Автор

This channel is probably one of the best channels I know for development things. Great content!

christerjohanzzon
Автор

That extra CSS is there from tailwind Integration, so just don't use it :) and install tailwind manually.
As for returning fragments, I've heard talk about basically giving api of renderToString (or stream) to astro components soon, so you could use that for fragments

JLarky
Автор

do you share you dotfiles anywhere? really like the look of your terminal

sfeukxj