3 ms·
To anyone feeling a desire to reflexively dismiss Alpine.js, I'd strongly suggest taking an hour or two rewriting a toy project that uses Stimulus JS into Alpin
by AlchemistCamp 7y ago
To anyone feeling a desire to reflexively dismiss Alpine.js, I'd strongly suggest taking an hour or two rewriting a toy project that uses Stimulus JS into Alpine and give it a fair comparison.
If you haven't ever used Stimulus, then I'd be doubly cautious about making a snap judgement. If you're the type who writes every single site as a SPA, then this library isn't for you.
Alpine is gaining traction quickly in the Laravel world and isn't going to be disappearing in the near future. On the contrary it's likely to expand and gain adoption in other MVC framework ecosystems. I, for one, am seriously considering for my next Phoenix project.
- mands 7y agoWe're currently using a combination of Intercooler, Stimulus, and React components in our MPA depending on the interactivity and complexity needs of each component in question - so we're certainly not in the SPA camp. However having listened to the Full Stack Radio episode and trying Alpine out, I'm not convinced on writing interdependent JS fragments in HTML attributes. For our team Stimulus feels more robust - store state in the DOM, which then calls full JS/TS classes to do the computation - keeping the separation of concerns intact. We can also make use of Typescript typing, linting, and bundling of our Stimulus controllers, and test the behaviour more easily. Exciting to see more options in the non-SPA world tho!