Re:Native Javascript alternatives to jQuery methods
by scarface74 on Sunday March 31, 2019 @04:16PM
(#19538079)
For one project I worked on, I used a combination of Jquery and HandleBarsJs. It was a great combination and pretty clean. I attached events to the rendered template items, then changed the datamodel as appropriate and rerendered the template.
I didn’t (and still don’t) know any of the $cool_kids front end frameworks. But it couldn’t have been a SPA anyway. Each of the pages were created by a CMS that ran on the web and in a native mobile app that had to be able to work offline.
Re:Native Javascript alternatives to jQuery methods
by wolco on Sunday March 31, 2019 @11:18AM
(#19536008)
You can still put in a script tag and start using vue.
Re:Native Javascript alternatives to jQuery methods
by colecut on Monday April 01, 2019 @12:04AM
(#19540390)
You can't use components this way though, unfortunately.
I like Vue, never really jumped into react, but I hate using npm and all of the javascript build tools.. I end up fighting with them for a while and decide it's back to jQuery and simplicity. Always works.
If I have to do any DOM manipulation outside of perhaps hiding or showing an element based on a button press, I typically find it far more unwieldy to do all that stuff with jQuery than just scaffolding out a quick Vue component.
Plus, there is a build available with a runtime template compiler, so you can just pull that in via a CDN and prototype without needing a build step.
Obviously, it varies a lot based on the sort of things you build, but I’ve found it to have sped up my prototyping process enormously.