yii2-extensions/app-inertia-react
Composer 安装命令:
composer create-project yii2-extensions/app-inertia-react
包简介
Yii2 application template with Inertia.js and React 19
README 文档
README
Inertia.js + React 19 Application Template
Skeleton Yii2 application with Inertia.js + React 19 integration
Server-driven SPA with Tailwind CSS v4, shadcn/ui, dark mode, Cloudflare Turnstile, and Codeception tests
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,inertiaReact.devModeevaluates totrueinconfig/web.php, and the root view emits<script>tags pointing athttp://localhost:5173instead of the built manifest.- React Fast Refresh is wired automatically through
\yii\inertia\react\Bootstrap::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/. Production mode reads hashed assets frompublic/build/via the Vite manifest.
For CORS guidance on non-localhost setups (Docker, tunnels, reverse proxies), troubleshooting, and the full production-switch procedure, see the adapter's Development Notes.
Docker
docker compose up -d
Documentation
Package information
Quality code
Our social networks
License
yii2-extensions/app-inertia-react 适用场景与选型建议
yii2-extensions/app-inertia-react 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 6 次下载、GitHub Stars 达 4, 最近一次更新时间为 2026 年 04 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「react」 「yii2」 「inertia」 「tailwindcss」 「shadcn」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 yii2-extensions/app-inertia-react 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 yii2-extensions/app-inertia-react 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 yii2-extensions/app-inertia-react 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Async Reactive Postgres Driver for PHP (Non-blocking)
A custom URL rule class for Yii 2 which allows to create translated URL rules
Beautiful toast notifications for Laravel + Inertia.js applications. Fluent PHP API, multi-toast support, redirect-safe, with Vue 3 and React adapters.
Laravel integration for blade-to-react
SCEditor, a lightweight WYSIWYG BBCode & HTML editor extension for Yii 2.0 Framework
A simple, flexible Laravel package for adding polymorphic reactions to any model. React with any text: like, love, care, or anything you want.
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 34
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2026-04-15