yii2-extensions/app-inertia-react
Yii2 application template with Inertia.js and React 19
6
5
| Install | |
|---|---|
composer require yii2-extensions/app-inertia-react |
|
| PHP: | >=8.3 |
| License: | BSD-3-Clause |
| Last Updated: | Jun 22, 2026 |
| Links: | GitHub · Packagist |
Maintainer: terabytesoftw
Use the "Use this template" button on GitHub to create your own repository from this template.
Features
Quick start
# create a new Yii2 application using the Inertia.js + React 19 template
composer create-project --prefer-dist yii2-extensions/app-inertia-react:^0.1@dev app-react
# navigate to the application directory
cd app-react
# run database migrations
./yii migrate/up
# build production assets (one-shot; for live editing see the HMR workflow below)
npm run build
# start the development server
./yii serve
Development workflow with HMR
npm run build produces production assets once and exits. To edit .jsx
files and see changes in the browser without rebuilding, run two processes
side by side:
# Terminal 1 — Vite dev server (HMR for .jsx and Tailwind CSS)
npm run dev
# Terminal 2 — Yii2 in dev mode
YII_ENV=dev ./yii serve
How the pieces connect:
public/index.phpreads theYII_ENVenvironment variable. When it equalsdev, Yii's service locator lazily constructs the framework-agnostic Vite facade withDevelopmentConfiguration, and the root view emits<script>tags pointing athttp://localhost:5173instead of the built manifest.- React Fast Refresh is supplied through the application-owned
app\vite\ReactRefreshPreambleProvider. Edits to.jsxfiles and CSS update in place without a full page reload. - Before deploying, stop the Vite dev server, run
npm run build, unsetYII_ENV(or set it toprod), and servepublic/.ProductionConfigurationreads hashed assets frompublic/build/via the Vite manifest.
For manifest options, development-server behavior, and CORS configuration, see the
php-forge/vite documentation.
Docker
docker compose up -d
Documentation
Package information
Quality code
Our social networks
License
Related Packages
amaraa019/laravel-universal-crud
Laravel Breeze & React хослолд зориулсан Shadcn/ui + Laravel paginated response-...
34
0
yogijowo/laravel12-react-starterkit
Starter Kit Laravel 12 + React + Inertia + Tailwind + ShadCN UI + Spatie Permiss...
473
174
xtrulloreas/larareact12-esp
Kit de Inicio con Laravel 12 + React + Inertia + Tailwind + ShadCN UI + Spatie P...
3
0
mtiolaksono/laravel12-react-starter
Starter Kit Laravel 12 + React + Inertia + Tailwind + ShadCN UI + Spatie Permiss...
1
0