Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

vincent15000's avatar

InertiaJS seems to limit the possibilities in comparison with pure VueJS

Hello,

I just discover InertiaJS and I wonder if it is not less interesting than pure VueJS.

Effectively I see that with InertiaJS, each page is displayed via one controller and all the data displayed on that page comes from the controller.

For example if I need to display the list of the active students in two different pages (in a page a table and in another page a dropdown list), I need to have the same code to retrieve the students at two places in my code (in both controllers).

Whereas with pure VueJS and API, I only ned once each code and I call the list from the same place in my code.

Perhaps I don't know so much about InertiaJS and I could do another way with inertiaJS.

Instead I could also perhaps use InertiaJS only to load the views, and then inside a view I continue using only VueJS without InertiaJS.

Can you share your experience with InertiaJS, why you like it, why you don't like it, ... ?

Thank you ;).

Vincent

1 like
6 replies
Sinnbeck's avatar

You are still allowed to mix in pure ajax (axios) calls to get data for specific sites. I do so in some pages where I just have load some extra data manually to use on the page

But I get around duplication by having all of my code in reusable actions. So if I need to get the same data in multiple controllers, I just call the same action

At first it took some getting used to and I did also feel a bit trapped by how it worked. But before long I learned how to rely on inertia to load 99% of my data without any problems

1 like
Sinnbeck's avatar

@vincent15000 for me it let's me work so much faster. I add a route to web.php and a controller that returns inertia. Then I add a jsx file (I use react) and add the props I need, and it's working. I can now build out the page.

With redux and react router which I used before, it would take be 5 times setting up the route, adding axios calls, adding json endpoints, ensuring data consistency etc

1 like
vincent15000's avatar

@Sinnbeck Yes ok I understand your point of view. I will go forward in learning InertiaJS and apply this on a personal app I'm using to manage a part of my job. When I will have all finished, I will be able to compare with / without Inertia. For the moment, my app uses only VueJS and Laravel in API mode. So I transform it by integrating InertiaJS.

Thanks for your comments ;).

Sinnbeck's avatar
Sinnbeck
Best Answer
Level 102

@vincent15000 I think it also depends on what you are building. I build a web survey using react earlier, and it would not work with inertia as every page is dynamic. Currently I am building a company intranet with alot of unique pages, and inertia is a perfect fit

Happy to help

1 like
vincent15000's avatar

@Sinnbeck Hum ... yes that's right. My app has several dynamic pages, so InertiaJS is perhaps not the best technology to use in this case. What I find very kind is the authentication system : I have nothing to do in the front end, whereas with pure VueJS, I have to set it.

But I also have a lot of CRUD pages, perhaps InertiaJS could be fine for CRUD (table of data and edit and delete buttons, edit with modal form).

Please or to participate in this conversation.