aurawindsurfing's avatar

Convince me to use Inertia/React

I have been using Laravel since v5.

I have build and maintain multiple projects with Blade/Livewire some bigger some smaller.

This weekend I set out to learn how to use Inertia and React. After watching few episodes of

https://laracasts.com/series/beginning-react https://laracasts.com/series/build-modern-laravel-apps-using-inertia-js

I start to wonder WTF do I need it? Why do I need another framework and abstraction to do exactly the same thing as I was doing so far? Let me also add that I'm a very pragmatic programmer and I would not use animations, bells and whistles. I find them unnecessary for a good user experience.

Why all the hype and push towards Inertia/React?

Convince me, please!

0 likes
11 replies
RemiM's avatar
RemiM
Best Answer
Level 16

Why all the hype and push towards Inertia/React?

Because it's the latest JavaScript monolith way of doing thing with Laravel? Livewire is getting older, they are pushing their latest product, it's just a marketing thing.

The interesting question is rather, why do you want people to convince you to use something if you are perfectly fine using Livewire in the first place.

I would say, use Inertia if:

  • You find out that Inertia solves problems that Livewire can't.
  • Your job requires you to use it.
  • You love and want to use React in a Laravel ecosystem.
  • You enjoy learning and reinventing the wheel over and over again (JS based stuffs).

If you find yourself in one of these categories, it makes sense, otherwise, the pragmatic approach is to continue doing what you are doing, since it seems to work perfectly for you, why bother?

aurawindsurfing's avatar

@RemiM very tempted to accept it as Best Answer as none of the points you mentioned apply to me but I will give others a chance. I just wonder what am I missing if anything.

Snapey's avatar

I can't convince you.

And being self employed, you don't need to do something just because it looks good on your CV or you can find a higher paid job because you are a unicorn.

1 like
JussiMannisto's avatar

Why all the hype and push towards Inertia/React?

Those are just tools you can use, I don't know what push you're referring to. You could equally ask why anyone would pick Livewire when other tools do the same thing. There's obviously no need to move away from Livewire if it does everything you need.

I've used Inertia + React in most new projects for a while now. It's for three main reasons:

  • UX. Navigation and rendering is extremely fast, especially with the new features of Inertia 2.
  • Development speed. I find it easier to develop UIs that have anything beyond simple CRUD forms.
  • Rich ecosystem of libraries and tools.
aurawindsurfing's avatar

@JussiMannisto thank you for your answer. Would you share with me any of those libraries/tools that you find appealing in React UI? I figure out that this might be the case but as I said in the original question - I do not really fancy all those extras as I find that user usually wants CRUD UI that just works.

Really interesting to see what could be the selling point of React.

I also get that it might be just me getting used to it and once I do I could be more productive with nicer UI's.

Thanks!

JussiMannisto's avatar

@aurawindsurfing The libraries depend on what you're doing. The point is that React (and Vue to a lesser extent) are so widely used that there are lots of existing libraries and kits for all kinds of features. Of course vanilla JS has a lot too.

1 like
jlrdw's avatar

For regular web apps, you are just as well off using blade, regular JS and Axios JS IMO. I can handle most complex things with a server fetched partial.

1 like
Bearcoding's avatar

Hi @aurawindsurfing to answer to your question... well it depends... In my case I'm new to the laravel ecosystem so using .blade or livewire is not as easy for me as simply opening my already known .tsx file. So in terms of frontend development in my case I prefer using Inertia to access the framework I already know because I'm employed in an enterprise were we use react in a daily basis. I'm used to react, having the ability to be pragmatic as you are using livewire, I use React and to use it in a monolith (since I don't need all my projects to be divided in frontend and backend code that will be hosted in different servers) Inertia feels right to use.

2 likes
IsmailOuali's avatar

I didn’t initially choose Inertia with React (TSX), but after deploying to production, I realized how smooth and fast the navigation is. It feels like a true SPA, without the complexity of managing a separate API. Inertia lets you build modern apps with server-side routing and client-side transitions—great UX with less overhead. Paired with TypeScript, it gave structure and safety during development.

Please or to participate in this conversation.