PHP code example of mimicreative / yii2-react

1. Go to this page and download the library: Download mimicreative/yii2-react library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mimicreative / yii2-react example snippets


// 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'
          ]
        ]
      ]
    ]
  ]
];