Any recommendation for a lightweight and complementary JavaScript library? Validate forms, XHR wrapper, etc. without the bulk of jQuery.
Any recommendation for a lightweight and complementary JavaScript library? Validate forms, XHR wrapper, etc. without the bulk of jQuery.
That does 90% of what I need when sprinkling backend AJAX-y interactivity on a straight HTML page with a backend that sends JSON or HTML back.
https://htmx.org/examples/inline-validation/
For more jquery-esque fine-grained control for building custom elements/components on my pages I turn to:
I love both of these libraries.
https://gist.github.com/egeozcan/cdc90e290271f3ea4b6801dcf1a...
I should mention, I did want it to be quick and dirty (it's a prototype), but well, it could have been a bit more concise. Double set parentheses come from the templating system I use BTW, if it wasn't clear.
Being HTML oriented is very cool, and you get a lot of things for free, but I keep saying "oh this would have been much easier with react" a bit too much.
> Any recommendation for a lightweight and complementary JavaScript library?
> Validate forms, XHR wrapper, etc. without the bulk of jQuery.
Today, targeting modern web browsers? Vanilla Javascript, really.Since ES6 (2015) Vanilla Javascript has been very good. Form validation is free with HTML5, XHR is already wrapped with a one-line Promise API.
Seems there are some more ideas here: https://www.technotification.com/2019/06/5-lightweight-jquer...