Fantastic demo! Glad this simplified your code so much. Made a note that the "failed to validate" throw message could include the error messages for debugging. Also, console ninja is SO COOL
Thanks for the great tool! I know there's been so much into the crafting of the experience. Excited to see how it continues to develop! And totally agree about console ninja :)
Excellent videos! Keep doing what you're doing. I'm a big fan! I'm on your course as well. It's very good. thank you. If you don't mind; Do you think Astro could be used as a production unit to spit out static sites.
Here is the comment pointing out in the last name error message, ye put “first name” 🤓 Very cool demo! Astro is growing so fast in features, I can’t keep up.
You can use the progressive fallback and submit to the page like html does automatically and then capture that request and process the action. I should do a video on that!
You can! If you omit the “input” option, you get the plan FormData object to do whatever you want. But as Chris mentioned, you won’t get that clean isInputError utility for error messages. It’ll be more to do yourself
@@CodinginPublic It's great, I'll leave sub and so on, I like Astro and I'm learning it, there is very interesting content on your channel about it so I'll be here more often, I hope to see more new things from Astro, greetings and much success!
I'm a bit confused and this is going to sound like a stupid question but why did we need to refactor the API endpoint logic into a server action? Is there a reason why this validation couldn't happen at the endpoint ".json.ts" itself?
Fantastic demo! Glad this simplified your code so much. Made a note that the "failed to validate" throw message could include the error messages for debugging. Also, console ninja is SO COOL
Thanks for the great tool! I know there's been so much into the crafting of the experience. Excited to see how it continues to develop! And totally agree about console ninja :)
What a great overview. Thanks so much for this!
Thanks so much, James! That’s so kind!
Great demo, the Astro actions is a very cool feature, thank you for sharing this content, keep it up with the great content.
Thanks for covering these new features!
Yeah, just had a couple of hours to play with it yesterday, but seems really cool!
@@CodinginPublic Definitely! I hope it goes stable soon!
@@jamesdimgiven the speed of the Astro Dev Team - I wouldn't be surprised if it got stable very very soon!!! 😎👍
Excellent videos! Keep doing what you're doing. I'm a big fan! I'm on your course as well. It's very good. thank you.
If you don't mind; Do you think Astro could be used as a production unit to spit out static sites.
Here is the comment pointing out in the last name error message, ye put “first name” 🤓
Very cool demo! Astro is growing so fast in features, I can’t keep up.
lol didn’t notice that!
Do actions replace API endpoints? Or can/should they be used together? For different uses or in unison.
Thank you
They can be used together!
Great video, thank you! Do you think Astro actions would still make sense in conjunction with HTMX?
They both are an either/or. You either call the form submit via HTMX or use Astro actions.
Thank you for confirming!
Do we still need a form submit handler and preventDefault? Is there a better way?
You can use the progressive fallback and submit to the page like html does automatically and then capture that request and process the action. I should do a video on that!
Wonder if this can return multiple error messages after submit a large form?
Yep :)
Can I don't use Z?
I think you need to, but that's also kind of the core experience? So if you don't want to use zod to validate, I'd just use something else?
You can! If you omit the “input” option, you get the plan FormData object to do whatever you want. But as Chris mentioned, you won’t get that clean isInputError utility for error messages. It’ll be more to do yourself
@@bholmesdev Ah, thanks for your work on this. For now, I'm still relying on vanilla JavaScript for all forms.
wwoooww
Pretty cool, right!?
@@CodinginPublic It's great, I'll leave sub and so on, I like Astro and I'm learning it, there is very interesting content on your channel about it so I'll be here more often, I hope to see more new things from Astro, greetings and much success!
I'm a bit confused and this is going to sound like a stupid question but why did we need to refactor the API endpoint logic into a server action?
Is there a reason why this validation couldn't happen at the endpoint ".json.ts" itself?