At 5:23, instead of triggering a htmx request on load, you could just render the to-dos in the component on the server-side. That way the first load of the page comes with all the to-dos already there. No need to use htmx to do that.
megalike to this video, the idea of using tsx as the templating language is great. i was looking for a templating engine but your approach is much better. Thanks
Im using this stack...and having a problem...I had to use htmx:afterRequest api on script tags, because I have other actions to do if a request ended correctly (like fire notifications, popups,etc)...my problem is I'm not being able of pass the htmx response data to another jsx component using params (because is inside script tags)...this is driving me crazy last two days, if you can give me a hand, would be much appreciated. Great video!
Notice how when you add "class" and "for" attributes, you get yellow warning squiggles - being a TSX file, it assumes you're using React which requires "className" and "htmlFor". With this non-React JSX you're using I assume these attributes are legal, so is there a setting in eslint that allows these without a warning?
I think this is more an editor warning than an eslint thing. With Webstorm, you can simply just hover over it and click "add to custom attributes" which will get rid of the warning for you. I don't see the same warnings in vscode.
.tsx just tells typescript that the file contains jsx which we're using simply as just a templating language With htmx the goal is to have our backend return html chunks which were doing through jsx
For fetching ajax request and all that yeaa, but do you save every state of the button in the server? Dont make sense right? Htmx is for talking with server, kot for doing some button changing state depending on variable. No need backend server for that.
@@muhammadhafizuddin2965Correct. For interactions that do not require sending anything server, many people that use htmx combine the use of Alpine. It has things in common with htmx such as it’s a small, client-side JS library and it is implemented as a set of HTML attributes.
i dont think you would consider htmx application as a SPA..... i pretty sure raw html is sent over the wire and htmx just swaps it in.... it def closer to ssr...
At 5:23, instead of triggering a htmx request on load, you could just render the to-dos in the component on the server-side. That way the first load of the page comes with all the to-dos already there. No need to use htmx to do that.
Oh thats a really good point. Pinning your comment so everyone can see it!
megalike to this video, the idea of using tsx as the templating language is great. i was looking for a templating engine but your approach is much better. Thanks
Im using this stack...and having a problem...I had to use htmx:afterRequest api on script tags, because I have other actions to do if a request ended correctly (like fire notifications, popups,etc)...my problem is I'm not being able of pass the htmx response data to another jsx component using params (because is inside script tags)...this is driving me crazy last two days, if you can give me a hand, would be much appreciated. Great video!
Notice how when you add "class" and "for" attributes, you get yellow warning squiggles - being a TSX file, it assumes you're using React which requires "className" and "htmlFor". With this non-React JSX you're using I assume these attributes are legal, so is there a setting in eslint that allows these without a warning?
I think this is more an editor warning than an eslint thing. With Webstorm, you can simply just hover over it and click "add to custom attributes" which will get rid of the warning for you. I don't see the same warnings in vscode.
your webstorm is looking kinda fine blud, mind sharing what theme you are using?
its called "one dark vivid" 🫡
Could you make htmx +django tutorials as well?
I can look into it 🤔
was the point of htmx is not using tsx in the first place ?
.tsx just tells typescript that the file contains jsx which we're using simply as just a templating language
With htmx the goal is to have our backend return html chunks which were doing through jsx
For fetching ajax request and all that yeaa, but do you save every state of the button in the server? Dont make sense right? Htmx is for talking with server, kot for doing some button changing state depending on variable. No need backend server for that.
@@muhammadhafizuddin2965Correct. For interactions that do not require sending anything server, many people that use htmx combine the use of Alpine. It has things in common with htmx such as it’s a small, client-side JS library and it is implemented as a set of HTML attributes.
Incredible video.
Your jump cuts are too fast to read the code.
Why didn't you choose elysia over hono
just mainly wanted to try something new
@@cdbrw Elysia is faster and more compatible with Bun. But what's your thought
i dont think you would consider htmx application as a SPA..... i pretty sure raw html is sent over the wire and htmx just swaps it in.... it def closer to ssr...
No