News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Stoyan Stefanov:
Server-side React with PHP - part 2
September 19, 2013 @ 09:35:38

In a a previous post Stoyan Stefanov introduced a setup where you could render React templates on the server-side with the help of PHP and the v8 parsing. In this second part of the series, he extends that system and shows how to use it to update views based on new data.

Part 1 ended with todos. The first one was to couple the server-side generated code with the client-side React, so that any updates past the initial page load will be handled by React's client JS, which is where React shines. Let's see how you can do just that.

He gives an example similar to his previous one - displaying a table - but shows how to inject some values from PHP as a JSON string into the component. This time he saves the output of that rendering into a variable and reuses it as a part of a whole site render later.

0 comments voice your opinion now!
react javascript js v8 serverside render tutorial data

Link: http://www.phpied.com/server-side-react-with-php-part-2/

blog comments powered by Disqus

Similar Posts

Gergely Hodicska's Blog: What's new in PHP 5.3 - part 1: namespaces

Community News: Zend Releases Speaker List for ZendCon 2006

Kevin Boyd: Retrofitted Login Throttling

CorePHP Blog: A Guide to running Apache 2, PHP 4 & PHP 5 on Windows XP

Nils Luxton's Blog: Installing PHP 5.4.0alpha1 into Wampserver


Community Events





Don't see your event here?
Let us know!


series configure language extension podcast composer symfony install introduction opinion interview version unittest laravel list community conference release api voicesoftheelephpant

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework