React-PHP-V8Js

// the library
$react_source = file_get_contents('/path/to/build/react.js');
// all custom code concatenated
$app_source = file_get_contents('/path/to/custom/components.js');

$rjs = new ReactJS($react_source, $app_source);
$rjs->setComponent('MyComponent', array(
  'any': 1,
  'props': 2));

/// ...

// print rendered markup
echo '<div id="here">' . $rjs->getMarkup() . '</div>';

React-PHP-V8Js is an experimental library that uses the power of Facebook’s React library to render UI components on the server-side with PHP

React-PHP-V8Js →
React | A JavaScript library for building user interfaces →

Note: Don’t confuse the React above with the aforementioned React

Published by Bramus!

Bramus is a frontend web developer from Belgium, working as a Chrome Developer Relations Engineer at Google. From the moment he discovered view-source at the age of 14 (way back in 1997), he fell in love with the web and has been tinkering with it ever since (more …)

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.