mimicreative/yii2-react
Composer 安装命令:
composer require mimicreative/yii2-react
包简介
ReactJS Asset Bundle for Yii2
README 文档
README
Installation
The preferred way to install this extension is through composer.
Add to the require section of your composer.json file:
"mimicreative/yii2-react": "~1.0"
And run in terminal
composer update
Usage
Use as the asset bundle in Yii2 View files.
// use this if you do not need addons
\mimicreative\react\ReactAsset::register($this);
// use this if you need addons
\mimicreative\react\ReactWithAddonsAsset::register($this);
By default, this extension use the minified version. I also include the
react-dom.min.js because we usually need it to render in js files.
To customize what asset to use, you can set the configuration in the Yii2 config
files. Please refer to React Bower package
for the list of the files.
For example if you want to use non-minified version:
// in main.php config file
return [
'components' => [
'assetManager' => [
'bundles' => [
'mimicreative\react\ReactAsset' => [
'js' => [
'react.js',
'react-dom.js'
]
],
'mimicreative\react\ReactWithAddonsAsset' => [
'js' => [
'react-with-addons.js',
'react-dom.js'
]
]
]
]
]
];
Further Information
Please, check the React.js site documentation for further information about its configuration options.
mimicreative/yii2-react 适用场景与选型建议
mimicreative/yii2-react 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.34k 次下载、GitHub Stars 达 13, 最近一次更新时间为 2016 年 06 月 16 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「react」 「yii2」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 mimicreative/yii2-react 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mimicreative/yii2-react 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 mimicreative/yii2-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
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.
This library tries to create a simple promise factory standard while waiting for a psr.
统计信息
- 总下载量: 1.34k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 13
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-06-16