PHPackages                             g3n1us/laravel-react-sync - 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. g3n1us/laravel-react-sync

ActivePackage

g3n1us/laravel-react-sync
=========================

Coordinate React frontends with a Laravel controller for updates and maintaining a universal frontend and backend application state

v1.2.0(7y ago)12501GPL-3.0JavaScriptPHP &gt;=5.5.9CI failing

Since Jul 4Pushed 5y ago1 watchersCompare

[ Source](https://github.com/g3n1us/laravel-react-sync)[ Packagist](https://packagist.org/packages/g3n1us/laravel-react-sync)[ RSS](/packages/g3n1us-laravel-react-sync/feed)WikiDiscussions master Synced today

READMEChangelog (5)Dependencies (1)Versions (12)Used By (0)

Laravel React Sync
==================

[](#laravel-react-sync)

[![](https://camo.githubusercontent.com/537a8cb3fa1a5f4a92325710b59682a0718b7c1251748fd1d4e571fd89534937/68747470733a2f2f75706c6f61642e77696b696d656469612e6f72672f77696b6970656469612f636f6d6d6f6e732f7468756d622f332f33642f4c61726176656c4c6f676f2e706e672f32313270782d4c61726176656c4c6f676f2e706e67)](https://camo.githubusercontent.com/537a8cb3fa1a5f4a92325710b59682a0718b7c1251748fd1d4e571fd89534937/68747470733a2f2f75706c6f61642e77696b696d656469612e6f72672f77696b6970656469612f636f6d6d6f6e732f7468756d622f332f33642f4c61726176656c4c6f676f2e706e672f32313270782d4c61726176656c4c6f676f2e706e67)[![](https://camo.githubusercontent.com/384cadd2321211de3bfa6fdd4779bf912d10b0638199d4e73cf6fb62a53b6cc8/68747470733a2f2f75706c6f61642e77696b696d656469612e6f72672f77696b6970656469612f636f6d6d6f6e732f7468756d622f612f61372f52656163742d69636f6e2e7376672f33323070782d52656163742d69636f6e2e7376672e706e67)](https://camo.githubusercontent.com/384cadd2321211de3bfa6fdd4779bf912d10b0638199d4e73cf6fb62a53b6cc8/68747470733a2f2f75706c6f61642e77696b696d656469612e6f72672f77696b6970656469612f636f6d6d6f6e732f7468756d622f612f61372f52656163742d69636f6e2e7376672f33323070782d52656163742d69636f6e2e7376672e706e67)

Make your React components and Laravel models play nicely!

Installation
------------

[](#installation)

**Install using Composer:**

```
composer require g3n1us/laravel-react-sync

```

> Note: The next step will be unnecessary in most cases

If using Laravel 5.5 or later and autodiscovery is not disabled, the package will be discovered and ready to use automatically. If NOT, then add the service provider to the list of providers in `config/app.php`.

```
'providers' => [
	/*
	 * Application Service Providers...
	 */
	 G3n1us\LaravelReactSync\LaravelReactSyncServiceProvider::class,
]
```

Run `react-sync` Preset
-----------------------

[](#run-react-sync-preset)

If this you are installing the library on a fresh Laravel installation, run the `preset` Artisan command to complete installation

> Note: If this is NOT a fresh installation, do no run this command. Instead, you can run `php artisan vendor:publish` to copy the necessary files into your resources directory.

```
php artisan preset react-sync

```

Follow the onscreen instructions, and run:

```
npm install && npm run dev

```

Installation is complete!

Usage
-----

[](#usage)

`ReactSync` provides two base components to be used in the place of the standard `React.Component`. The first `MasterComponent` is hydrated with the Laravel view's data. This is set via an `include`d Blade template in the top of your application's markup. The provides a global object that contains application data that maps to the data that is part of the context of the Blade view. Additionally, this object contains objects and methods that provide access to the underlying Laravel application's data, such as the `Request`, defined `Guard`s, the `Route` and the authenticated user.

This data can be used in components extending this class. Changes set via a traditional web form (or form fields) will mutate your `state` and trigger a render as you would expect in React.

Alternately, the `ReactSyncAppData.page_data` object can be mutated manually to trigger a refresh, as this object is set as the components initial `state`.

GH Pages URL

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 97.1% 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 ~178 days

Total

4

Last Release

2331d ago

Major Versions

v1.2.0 → v2.0.0-beta2019-12-21

PHP version history (2 changes)v1.0.0PHP &gt;=5.5.9

v2.0.0-betaPHP ^7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/3c333ee6f326dcf1db86250abc626934305f2a584ad240fffd26ca14c111016e?d=identicon)[g3n1us](/maintainers/g3n1us)

---

Top Contributors

[![g3n1us](https://avatars.githubusercontent.com/u/2233924?v=4)](https://github.com/g3n1us "g3n1us (102 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")

### Embed Badge

![Health badge](/badges/g3n1us-laravel-react-sync/health.svg)

```
[![Health](https://phpackages.com/badges/g3n1us-laravel-react-sync/health.svg)](https://phpackages.com/packages/g3n1us-laravel-react-sync)
```

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11320.2M21](/packages/anourvalar-eloquent-serialize)[namu/wirechat

A Laravel Livewire messaging app for teams with private chats and group conversations.

54324.5k](/packages/namu-wirechat)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135192.6k5](/packages/statamic-rad-pack-runway)

PHPackages © 2026

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