PHP code example of arryanggaputra / viewreact
1. Go to this page and download the library: Download arryanggaputra/viewreact 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/ */
arryanggaputra / viewreact example snippets
use Arryanggaputra\ViewReact;
use Arryanggaputra\ViewReactSource;
$reactSource = new ViewReactSource('/path/your/react/or/bundle/*.js');
$view = new ViewReact($reactSource);
echo $view->render('HelloWorldComponent', [
'name' => 'Jon',
]);