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

Munch's avatar
Level 1

Am I using Inertia JS correctly?

I'm currently working on a project where the majority of the site pages will be written with blade as I want HTML rendered on the server. However I have some forms I'd really like to leverage React with so I setup Inertia JS and have implemented it so only some pages will use Inertia React. I have it setup so Inertia is included within a section of a blade template so I can keep my blade layout.

I understand Inertia can SSR React but I want to keep running costs to a minimum. I also know that Laravel has Livewire which is probably more inline with what I'm doing however I much prefer to write React/JSX.

My question is am I using Inertia incorrectly? Brief summary of my setup:

@extends("layouts/main")

@section("head")
    @vitereactrefresh
    @vite(['resources/js/app.jsx', "resources/js/Pages/{$page['component']}.jsx"])
    @inertiaHead
@endsection

@section("content")
    @inertia
@endsection

Rest of the setup is as per Inertia docs.

0 likes
3 replies
martinbean's avatar

I'm currently working on a project where the majority of the site pages will be written with blade as I want HTML rendered on the server.

am I using Inertia incorrectly?

@munch No. Inertia replaces server-rendered Blade templates.

If you want some “niceties” on your front-end then just use some JavaScript; don’t completely replace your front-end for sake of submitting a form via AJAX or something.

Munch's avatar
Level 1

@martinbean Thanks for the reply. So I'm best of either going fully with Blade and some JavaScript or using just Inertia JS? I guess I could learn and use Livewire for them pages I want more niceties?

Please or to participate in this conversation.