yireo/magento2-react
Composer 安装命令:
composer require yireo/magento2-react
包简介
Module to add React to Magento 2 KO frontend
README 文档
README
The current Magento 2 frontend is based on Knockout, RequireJS and ES5 code. However, with an eye on the upcoming PWA moves, it is already possible to add React components to the Magento 2 frontend as it is. This Magento module serves as a base module, to offer a generic Webpack configuration for modules like Yireo_ReactMinicart and Yireo_ReactMenu.
Installation
Use the following commands to install this module into Magento 2:
composer require yireo/magento2-react:dev-master
bin/magento module:enable Yireo_React
bin/magento setup:upgrade
Next, copy the files package.json and webpack.config.js to the Magento root. Next, install all of the packages:
yarn install
Next, you can build React sources in various modules via Webpack:
yarn dev
Alternatively, you can also copy the 2 files to another folder and use the MAGENTO_ROOT variable:
MAGENTO_ROOT=/var/www/html yarn dev
Usage
This module has no real functionality. It is only offering configuration files for other React modules.
See the Yireo_ReactMenu module for a dummy component.
The goal is to either create a module with a view/frontend/react_source folder or a theme with a react_source folder and
have this Webpack configuration pick up on those files to create a single bundle. Dynamic bundles (with an import() function
call) are also supported.
The theme is identified with a global variable:
MAGENTO_THEME=Magento/luma yarn dev
Experimental
This module is experimental and only meant for developers that are happy to invest time into it. It doesn't mean that it is costing a lot of effort, it simply means that the project requires knowledge on React essentials.
yireo/magento2-react 适用场景与选型建议
yireo/magento2-react 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 9.83k 次下载、GitHub Stars 达 24, 最近一次更新时间为 2019 年 03 月 22 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「magento」 「composer-installer」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 yireo/magento2-react 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 yireo/magento2-react 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 yireo/magento2-react 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Entity services for magento2
Composer installer for Magento modules
Magento 2 Social Login extension is designed for quick login to your Magento 2 store without procesing complex register steps
Magento - Clean up session extension
Maps module for magento2
统计信息
- 总下载量: 9.83k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 24
- 点击次数: 2
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: OSL-3.0
- 更新时间: 2019-03-22