Download the PHP
package yii2-extensions/inertia-react without Composer
On this page you can find all versions of the php package
yii2-extensions/inertia-react. It is possible to download/install
these versions without Composer. Possible dependencies are resolved
automatically.
After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.
Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.
In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories.
In this case some credentials are needed to access such packages.
Please use the auth.json textarea to insert credentials, if a package is coming from a private repository.
You can look here for more information.
Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
To use Composer is sometimes complicated. Especially for beginners.
Composer needs much resources. Sometimes they are not available on a simple webspace.
If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
React adapter helpers for yii2-extensions/inertia React-friendly root view and Vite asset integration for Yii2 Inertia applications
## Features
## Overview
`yii2-extensions/inertia-react` is a thin PHP-side adapter package for building React-based Inertia applications on top
of `yii2-extensions/inertia`.
This package does not install npm dependencies for you. Instead, it provides.
- a React-specific bootstrap class for Yii2;
- a default root view that outputs Vite tags plus the initial Inertia page payload;
- a Vite helper component for development-server and manifest-driven production assets;
- React Refresh preamble output for `@vitejs/plugin-react` in development mode;
- documentation and conventions for the application-owned React client entrypoint.
## Installation
Register the React bootstrap class.
Use only `yii\inertia\react\Bootstrap::class` in the bootstrap list. It already delegates the base
`yii2-extensions/inertia` bootstrap.
## React client entrypoint
Install the client-side dependencies in your application project.
Then create your client entrypoint, for example `resources/js/app.jsx`:
## Development mode and React Refresh
When `devMode` is `true` and `preambleProvider` is set to `\yii\inertia\react\Bootstrap::reactRefreshPreambleProvider()`,
the Vite helper bypasses the production manifest and emits, in order: the React Refresh preamble, `@vite/client`,
and each `entrypoints` script pointing at `devServerUrl`. Edits to `.jsx` files are hot reloaded without a full page refresh.
Run the Vite dev server and the Yii2 application side by side:
See [Development Notes](docs/development.md) for the full HMR workflow, CORS notes, and troubleshooting.
## Production asset integration
This package expects a Vite manifest file generated with `build.manifest = true`. In production it will render.
1. style sheet tags for the entrypoint chunk and its imported chunks;
2. module entry scripts for each entrypoint;
3. optional `modulepreload` tags for imported JavaScript chunks.
## Documentation
For detailed configuration options and advanced usage.
- ๐ [Installation Guide](docs/installation.md)
- โ๏ธ [Configuration Reference](docs/configuration.md)
- ๐ก [Usage Examples](docs/examples.md)
- ๐งช [Testing Guide](docs/testing.md)
- ๐ ๏ธ [Development Notes](docs/development.md)
## Package information
[](https://www.php.net/releases/8.3/en.php)
[](https://github.com/yiisoft/yii2/tree/22.0)
[](https://packagist.org/packages/yii2-extensions/inertia-react)
[](https://packagist.org/packages/yii2-extensions/inertia-react)
## Quality code
[](https://codecov.io/github/yii2-extensions/inertia-react)
[](https://github.com/yii2-extensions/inertia-react/actions/workflows/static.yml)
[](https://github.com/yii2-extensions/inertia-react/actions/workflows/linter.yml)
[](https://github.styleci.io/repos/1203882767?branch=main)
## License
[](LICENSE)
Composer command for our command line client (download client)This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free.Standard composer command
The package yii2-extensions/inertia-react contains the following files
Loading the files please wait ...
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.