3 ms·
As a Rails dev, I find this very interesting. I've already jumped on the Vue bandwagon and have had a pretty good time using it. That being said, I recently sta
by jaredcwhite 9y ago
As a Rails dev, I find this very interesting. I've already jumped on the Vue bandwagon and have had a pretty good time using it. That being said, I recently started a new small-ish Rails project and loaded Vue in via 5.1's Webpack integration...and ended up just hacking together some jQuery stuff for minor front-end dynamism. It just was easier/faster for me to do that in this particular context.
However, I could definitely see myself using Stimulus instead because it's just so incredibly simple to "sprinkle" (DHH's word) some JS onto the page and get dynamism quickly. I look forward to putting Stimulus through its paces and see if it is a good option for projects where Vue is overkill.
- bphogan 9y agoThis has been my experience on the last two small things I built. I just reached for the jquery (or even just regular JS) because I didn't need that much. Isn't it cool to have choices? I don't care if it's not cool to use jquery anymore. I shipped stuff and I'm not even sorry.
- crescentfresh 9y ago> Vue is overkill The number of projects where something as small and simple as Vue could be considered overkill has to be remarkably small, I feel. I've used Vue in single pages (i.e. a single page of a large application) inside a single div as needed. In my case attaching behavior inside a modal dialog (ie the modal was managed by some other framework). It is very small and lean as is.
- jaredcwhite 9y agoI should have worded that better...in this context, it's not that Vue the library is overkill, but the overall paradigm. Vue's not well-suited to server-rendered HTML that has some dynamic features after the fact.
- andrei_says_ 9y agoSpeaking of rails and Vue, how do you manage authentication? Can you point me to an example of a Vue-powered page in a larger rails app consumes json data after authentication?