VueJS cannot be really used with all its component approach
What do you mean by this; a Page can be composed of Components?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello,
I just test InertiaJS and I'm both happy and disappointed.
Happy because it's much easier to use Laravel routes with InertiaJS, no need to create any VueJS routes binded to the components, each time I need to access a resource / page, it's protected by the Laravel middlewares, I can easily use the policies, form requests / validation tools, ...
Disappointed because VueJS is interesting with the component approach whereas InertiaJS is with a page approach and then, when really using all InertiaJS functionalities, VueJS cannot be really used with all its component approach.
Perhaps a good compromise is to use InertiaJS just for its conveniency to continue using all Laravel features (routing, middlewares, policies, validation tools, ...) when loading a new page, but inside each page it's probably more interesting to use VueJS with all its component approach.
What do you think about that ?
Thanks for your participation.
Vincent
@vincent15000 up to you to decide the best strategy for independent component data-fetching. Personally, I would lean on the Inertia page mostly, simply because a Page then requires minimal requests. If every component is making independent requests, the experience will likely suffer. Also, whenever the Page re-renders, you need to be careful that the Component's are not re-fetching their data unnecessarily.
One example where I have a Component on the page but making an independent request is a Stats component which requires an expensive query - which would slow down the main Page if its data was included in that payload.
Please or to participate in this conversation.