by hu3 · 4y ago · 0 comments
I've been dying to implement Vue component responses for my projects ever since I first heard about it because I believe that this is a way to keep things mostly on the backend while still preventing JS spaghetti on the frontend.
I read about https://inertiajs.com/ but it seems too overkill. I'd prefer to keep things simpler.
If you just want to use Vue for your rendering layer, you can can do that using a very minimal partial that renders the root element and loads the JS to mount the component. This example should get you started (Vue 2 syntax):
https://gist.github.com/yourboyblue/834aac9c427a97037dd49694...