htmx in 100 seconds

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

I hope that htmx succeeds in abstracting a good portion of the Javascript boilerplates, just like Tailwind did with css. If the community buys into the idea, this will certainly happen.

👍︎︎ 1 👤︎︎ u/Beneficial-Alps7944 📅︎︎ Jul 07 2023 đź—«︎ replies
Captions
htmx a UI library for the web that can replace your JavaScript framework with the Simplicity of HTML playing HTML is more capable than you think every time you click on a link or submit a form it automatically sends an HTTP request to the server and renders the response in the UI it's so easy but why stop there HDMX Embraces an architectural constraint known as Hyper media as the engine of application state by adding new attributes to HTML that can handle the complex requirements of modern uis it gives you the ability to make a request to the server from any element by providing an attribute with an HTTP verb and the URL endpoint on the server it'll take the response from the server and replace this element asynchronously or it can specify a Target to replace a different element on the page it can also customize the event on which it's triggered along with modifiers like delay and throttle to control the way the request is sent it keeps track of the loading state so you can show a spinner apply CSS transitions for animation and builds on the HTML validation API to validate forms it even has a client-side router called boost that can make any traditional web application feel like a faster single page application and it also includes extensions for more advanced features like websockets and Integrations with other HTML Frameworks like Alpine to install it simply Import htmx in a script tag from the head of an HTML document you just put the hyper back into hypertext now all you need is a server in your favorite programming language that returns html text as a response now we can use the HX get attribute to make a request to this endpoint along with HX swap to replace this element with the HTML on the response when swapping though we don't only have the option to replace the outer HTML but we could also append or prepend the response to the existing UI or the HX Target attribute allows us to move the UI to a completely different element it finds that element with a CSS selector but has additional syntax like next and closest allowing you to easily find the proper element without a bunch of custom IDs we might also use HDMX indicator to show a loading spinner and write a CSS transition animation for the incoming element behind the scenes a HDMX has an extensive event system that you can tap into by listening to custom events with JavaScript and if you want to run your own client-side JavaScript the HX on attribute allows you to bind a JavaScript function to any element and that's all it takes to build a highly polished full stack HTML application on the information superhighway this has been htmx in 100 seconds do you love it or do you hate it let me know in the comments thanks for watching and I will see you in the next one
Info
Channel: Fireship
Views: 607,220
Rating: undefined out of 5
Keywords: webdev, app development, lesson, tutorial
Id: r-GSGH2RxJs
Channel Id: undefined
Length: 2min 26sec (146 seconds)
Published: Fri Jul 07 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.