2017 © Pedro Peláez
 

symfony-bundle reactjs-php-bundle

Render ReactJS component in server side using reactjs/react-php-v8js

image

qpautrat/reactjs-php-bundle

Render ReactJS component in server side using reactjs/react-php-v8js

  • Tuesday, August 11, 2015
  • by qpautrat
  • Repository
  • 3 Watchers
  • 32 Stars
  • 55 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 3 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

reactjs-php-bundle

Render ReactJS components in server side using reactjs/react-php-v8js, (*1)

Prerequisites

V8Js PHP extension, (*2)

Installation

composer require qpautrat/reactjs-php-bundle

Whitelist following library in require section until maintainers release a version on packagist, (*3)

"reactjs/react-php-v8js": "*@dev"

Register the bundle in your AppKernel, (*4)

new QPautrat\ReactjsPhpBundle\ReactjsPhpBundle()

Configuration

Add in your config.yml file, (*5)

reactjs_php:
    library_path: path_to_reactjs_library
    app_path: path_to_app_components

Usage

Use helper with php engine, (*6)

<?php echo $view['reactjs']->renderMarkup('Component', array('foo' => 'bar')) ?>
<?php echo $view['reactjs']->renderJS('Component', '#dom_element', array('foo' => 'bar')) ?>

Or you can use our twig extension as well, (*7)

{{ 'Component'|reactjs_render_markup({'foo':'bar'}) }}
{{ 'Component'|reactjs_render_js('#component', {'foo':'bar'}) }}

Demo

We provide a small demo application in another repository, living in a docker container, that you can use to test., (*8)

License

This bundle is available under the MIT License, (*9)

The Versions

11/08 2015

dev-master

9999999-dev https://github.com/qpautrat/reactjs-php-bundle

Render ReactJS component in server side using reactjs/react-php-v8js

  Sources   Download

MIT

The Requires

 

by Quentin Pautrat

php bundle symfony react reactjs v8js srr

11/08 2015

1.0.0

1.0.0.0 https://github.com/qpautrat/reactjs-php-bundle

Render ReactJS component in server side using reactjs/react-php-v8js

  Sources   Download

MIT

The Requires

 

by Quentin Pautrat

php bundle symfony react reactjs v8js srr