Download the PHP package smile/magento2-react without Composer

On this page you can find all versions of the php package smile/magento2-react. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

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.
Please rate this library. Is it a good library?

Informations about the package magento2-react

This module is a friendly fork of the POC made by Yireo which is available here : https://github.com/yireo-training/Yireo_React

Many thanks to Yireo and Jessie Reitsma for setting the first steps of this implementation.

React for Magento 2 Knockout-based frontend

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.

Pre-requisites

This module requires :

What does it contains

Installation

Use the following commands to install this module into Magento 2:

composer require smile/magento2-react
bin/magento module:enable Smile_React
bin/magento setup:upgrade

The composer install should have copied the files package.json and webpack.config.js to your Magento root. If that's not the case, you can copy them manually.

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.


All versions of magento2-react with dependencies

PHP Build Version
Package Version
Requires magento/framework Version ^100.1|^101.0|^102.0|^103.0
magento/magento-composer-installer Version *
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 smile/magento2-react contains the following files

Loading the files please wait ....