PHPackages                             vishu-b/react-php-v8js - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. vishu-b/react-php-v8js

ActiveLibrary[Templating &amp; Views](/categories/templating)

vishu-b/react-php-v8js
======================

PHP library that renders React components on the server

v2.0.0(10y ago)07BSD-3-ClausePHP

Since May 26Pushed 5y agoCompare

[ Source](https://github.com/vishuB/react-php-v8js)[ Packagist](https://packagist.org/packages/vishu-b/react-php-v8js)[ RSS](/packages/vishu-b-react-php-v8js/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

React-PHP-V8Js
==============

[](#react-php-v8js)

React-PHP-V8Js is an experimental library that uses the power of Facebook's [React](http://facebook.github.io/react/) library to render UI components on the server-side with PHP as well as on the client.

Prerequisites
=============

[](#prerequisites)

- Server running PHP 5.3.3+
- [V8Js PHP extension](http://php.net/v8js)

For a walkthrough how to setup V8Js PHP extension, use the links below:

- [On Linux](https://github.com/preillyme/v8js/blob/master/README.Linux.md)
- [On MacOS](https://github.com/preillyme/v8js/blob/master/README.MacOS.md)
- [On Windows](https://github.com/preillyme/v8js/blob/master/README.Win32.md)

Usage
=====

[](#usage)

```
// 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 '' . $rjs->getMarkup() . '';

/// ...

// load JavaScript somehow - concatenated, from CDN, etc
// including react.js and custom/components.js

// init client
echo '' . $rjs->getJS("#here") . '';

/// ...

// repeat setComponent(), getMarkup(), getJS() as necessary
// to render more components
```

License
=======

[](#license)

BSD License for React-PHP-V8Js

Copyright (c) 2014, Facebook, Inc. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name Facebook nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~223 days

Total

2

Last Release

3787d ago

Major Versions

v1.0.0 → v2.0.02016-01-04

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/22771534?v=4)[vishal46](/maintainers/vishal46)[@vishal46](https://github.com/vishal46)

---

Top Contributors

[![zpao](https://avatars.githubusercontent.com/u/8445?v=4)](https://github.com/zpao "zpao (11 commits)")[![vishuB](https://avatars.githubusercontent.com/u/13677102?v=4)](https://github.com/vishuB "vishuB (7 commits)")[![talyssonoc](https://avatars.githubusercontent.com/u/4325587?v=4)](https://github.com/talyssonoc "talyssonoc (4 commits)")[![jbroadice](https://avatars.githubusercontent.com/u/5153746?v=4)](https://github.com/jbroadice "jbroadice (3 commits)")[![stoyan](https://avatars.githubusercontent.com/u/51308?v=4)](https://github.com/stoyan "stoyan (3 commits)")[![teameh](https://avatars.githubusercontent.com/u/1330668?v=4)](https://github.com/teameh "teameh (1 commits)")[![simodima](https://avatars.githubusercontent.com/u/1193857?v=4)](https://github.com/simodima "simodima (1 commits)")

### Embed Badge

![Health badge](/badges/vishu-b-react-php-v8js/health.svg)

```
[![Health](https://phpackages.com/badges/vishu-b-react-php-v8js/health.svg)](https://phpackages.com/packages/vishu-b-react-php-v8js)
```

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[whitecube/nova-flexible-content

Flexible Content &amp; Repeater Fields for Laravel Nova.

8053.0M25](/packages/whitecube-nova-flexible-content)[mopa/bootstrap-bundle

Easy integration of twitters bootstrap into symfony2

7042.9M33](/packages/mopa-bootstrap-bundle)[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3871.2M](/packages/limenius-react-bundle)[nicmart/string-template

StringTemplate is a very simple string template engine for php. I've written it to have a thing like sprintf, but with named and nested substutions.

2101.7M30](/packages/nicmart-string-template)[symfony/ux-icons

Renders local and remote SVG icons in your Twig templates.

555.8M69](/packages/symfony-ux-icons)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
