PHPackages                             camspiers/reactjs-php-render - 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. camspiers/reactjs-php-render

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

camspiers/reactjs-php-render
============================

React rendering from PHP

0.1.0(11y ago)458.0k41PHPPHP &gt;=5.4.0

Since Jul 20Pushed 9y ago7 watchersCompare

[ Source](https://github.com/camspiers/reactjs-php-render)[ Packagist](https://packagist.org/packages/camspiers/reactjs-php-render)[ RSS](/packages/camspiers-reactjs-php-render/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (4)Versions (2)Used By (1)

ReactJS PHP Render
==================

[](#reactjs-php-render)

This library aims to provide multiple options for rendering React from PHP.

Experimental
------------

[](#experimental)

The API is experimental and is likely to change.

Concepts
--------

[](#concepts)

- Renderer (`ReactJS\Renderer\RendererInterface`)
- This interface is implemented by mutiple renderers to provide different potential rendering options (HTTP Server, V8Js etc)
- RuntimeFragmentProvider (`ReactJS\RuntimeFragmentProvider\ProviderInterface`)
- This interface is implemented to provider different environment support (CommonJS, Globals etc)

Usage
-----

[](#usage)

Renderers can be used directly to generate either "mountable" React HTML (including checksums and ids), or to generate static markup.

The React class (`ReactJS\React`) can be used to generate mountable React HTML along with JavaScript that will automatically mount the browser React component into the generated server rendered markup.

### Node

[](#node)

When using a node process, users are required to provide source file(s) in an appropriate format for node to execute, these source file(s) need include:

- React
- The component you are attempting to render

```
$node = ReactJS\ReactFactory::createUsingNode(
	'/usr/bin/nodejs',
	['bundle.js'] // bundle.js is a browserified bundle with React and TestComponent
);

echo $node->renderAutoMountingComponent('./TestComponent');
```

### V8

[](#v8)

When using the V8Js php extension, users are required to provide source file(s) in the appropriate format for V8 to execute, these source file(s) need include:

- React
- The component you are attempting to render

```
$v8 = ReactJS\ReactFactory::createUsingV8(
	['bundle.js'] // bundle.js is a browserified bundle with React and TestComponent
);

echo $v8->renderAutoMountingComponent('./TestComponent');
```

The result:

```

	Some testing content

	require('react').renderComponent(
		require(".\/TestComponent")(null),
		document.getElementById("53998c3f85044")
	)

```

Installation (with composer)
----------------------------

[](#installation-with-composer)

```
$ composer require camspiers/reactjs-php-render:dev-master

```

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.3% of commits — single point of failure

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

Unknown

Total

1

Last Release

4365d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/51294?v=4)[Cam Spiers](/maintainers/camspiers)[@camspiers](https://github.com/camspiers)

---

Top Contributors

[![camspiers](https://avatars.githubusercontent.com/u/51294?v=4)](https://github.com/camspiers "camspiers (26 commits)")[![pieterv](https://avatars.githubusercontent.com/u/438482?v=4)](https://github.com/pieterv "pieterv (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/camspiers-reactjs-php-render/health.svg)

```
[![Health](https://phpackages.com/badges/camspiers-reactjs-php-render/health.svg)](https://phpackages.com/packages/camspiers-reactjs-php-render)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k543.8M20.1k](/packages/laravel-framework)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

21866.0M1.7k](/packages/drupal-core)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M736](/packages/sylius-sylius)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M420](/packages/drupal-core-recommended)

PHPackages © 2026

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