PHPackages                             samsonasik/mezzio-react - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. samsonasik/mezzio-react

ActiveProject[HTTP &amp; Networking](/categories/http)

samsonasik/mezzio-react
=======================

Laminas mezzio skeleton with React.js Integration

1.1.0(4mo ago)3351BSD-3-ClausePHPPHP ^8.2CI passing

Since Jun 26Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/samsonasik/mezzio-react)[ Packagist](https://packagist.org/packages/samsonasik/mezzio-react)[ Docs](https://github.com/samsonasik/mezzio-react)[ Fund](https://samsonasik.wordpress.com/donate/)[ RSS](/packages/samsonasik-mezzio-react/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (2)Dependencies (17)Versions (14)Used By (0)

Example Using React.js in Mezzio application
============================================

[](#example-using-reactjs-in-mezzio-application)

[![ci build](https://github.com/samsonasik/mezzio-react/workflows/ci%20build/badge.svg)](https://github.com/samsonasik/mezzio-react/workflows/ci%20build/badge.svg)[![Mutation testing badge](https://camo.githubusercontent.com/ddc47e37c31187d3a8bd1ed1f27542b5315495c5253c322d8f1b882ab4282e70/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f7374796c653d666c61742675726c3d687474707325334125324625324662616467652d6170692e737472796b65722d6d757461746f722e696f2532466769746875622e636f6d25324673616d736f6e6173696b2532466d657a7a696f2d72656163742532466d6173746572)](https://dashboard.stryker-mutator.io/reports/github.com/samsonasik/mezzio-react/master)[![Code Coverage](https://camo.githubusercontent.com/fb92c73e30f5f11e51d7fa0b5339cfb56fcc6e5f300d702cc270054132237fb3/68747470733a2f2f636f6465636f762e696f2f67682f73616d736f6e6173696b2f6d657a7a696f2d72656163742f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/samsonasik/mezzio-react)[![Downloads](https://camo.githubusercontent.com/906ee87577dde0211b22cd0f7d7f340372b74dd9a3fb828d96e5000e1e83e0fb/68747470733a2f2f706f7365722e707567782e6f72672f73616d736f6e6173696b2f6d657a7a696f2d72656163742f646f776e6c6f616473)](https://packagist.org/packages/samsonasik/mezzio-react)

Introduction
------------

[](#introduction)

A Mezzio 3 Skeleton Application with React.js integration.

Features
--------

[](#features)

- SPA application with React Router DOM with cached pages after visited.
- Using server side template from Mezzio 3, eval'd with DOMPurify it first.
- Webpack support for [production](#production)

Setup
-----

[](#setup)

*1.* Run composer create-project command:

```
composer create-project samsonasik/mezzio-react
composer development-enable
```

*2.* Run PHP Development server

```
cd mezzio-react
composer serve
```

*3.* Open web browser

Production
----------

[](#production)

For deploy to production purpose, it has `webpack.config.js` in root directory that when we run `webpack` command, we can get `public/js/dist/bundle.js` after run it. If you don't have a `webpack` installed yet in your system, you can install nodejs and install `webpack` and `webpack-cli`:

```
sudo npm install -g webpack
sudo npm install -g webpack-cli
```

So, we can run:

```
webpack

Hash: 0dedd8dd8641d88b7665
Version: webpack 4.43.0
Time: 173ms
Built at: 06/26/2020 9:02:37 PM
                   Asset      Size  Chunks             Chunk Names
public/js/dist/bundle.js  3.33 KiB       0  [emitted]  main
Entrypoint main = public/js/dist/bundle.js
[0] ./public/js/app.js + 2 modules 6.32 KiB {0} [built]
    | ./public/js/app.js 1.62 KiB [built]
    | ./public/js/create-page.js 1.36 KiB [built]
    | ./public/js/Navigation.js 3.33 KiB [built]
```

After it generated, we can run the following commands to get `production` environment by default:

```
# disable dev
composer development-disable

# install with --no-dev
composer install --no-dev
```

In `default.phtml`, we have a `isDevelopment()` view helper check to use `js/app.js` when on development, and use `/js/dist/bundle.js` on production when exists.

```
// src/App/templates/layout/default.phtml
$isDevelopment = $this->isDevelopment();

// ...
    ->prependFile(
        $isDevelopment
            ? '/js/app.js'
            : (
                // when after run webpack, allow to use bundled js
                // fallback to use /js/app.js when not
                file_exists('./public/js/dist/bundle.js')
                    ? '/js/dist/bundle.js'
                    : '/js/app.js'
            ),
        'module'
    )
// ...
```

that will automatically take care of that.

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance78

Regular maintenance activity

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 98.5% 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

Every ~169 days

Recently: every ~505 days

Total

13

Last Release

121d ago

Major Versions

0.0.11 → 1.0.02024-11-01

PHP version history (3 changes)0.0.1PHP ^7.3

1.0.0PHP ^8.1

1.1.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/19076b7688ca1c8ee79ab3ac6fa6acdd7b96012973aba3b1a06cbb3154d7f3e5?d=identicon)[samsonasik](/maintainers/samsonasik)

---

Top Contributors

[![samsonasik](https://avatars.githubusercontent.com/u/459648?v=4)](https://github.com/samsonasik "samsonasik (64 commits)")[![unckleg](https://avatars.githubusercontent.com/u/10105499?v=4)](https://github.com/unckleg "unckleg (1 commits)")

---

Tags

psrpsr-7middlewarePSR-11laminaspsr-15mezzioSkeleton

###  Code Quality

TestsPHPUnit

Static AnalysisRector

### Embed Badge

![Health badge](/badges/samsonasik-mezzio-react/health.svg)

```
[![Health](https://phpackages.com/badges/samsonasik-mezzio-react/health.svg)](https://phpackages.com/packages/samsonasik-mezzio-react)
```

###  Alternatives

[mezzio/mezzio-skeleton

Laminas mezzio skeleton. Begin developing PSR-15 middleware applications in seconds!

12726.2k](/packages/mezzio-mezzio-skeleton)[mezzio/mezzio

PSR-15 Middleware Microframework

3883.6M97](/packages/mezzio-mezzio)[mezzio/mezzio-tooling

Migration and development tooling for Mezzio

191.1M21](/packages/mezzio-mezzio-tooling)[mezzio/mezzio-fastroute

FastRoute integration for Mezzio

162.7M52](/packages/mezzio-mezzio-fastroute)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.0M61](/packages/mezzio-mezzio-router)[mezzio/mezzio-helpers

Helper/Utility classes for Mezzio

134.3M67](/packages/mezzio-mezzio-helpers)

PHPackages © 2026

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