Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
React Renderer

React Renderer Laravel Package

limenius/react-renderer

Limenius ReactRenderer lets PHP applications render React components server-side by delegating to a Node.js process, so you get fast, SEO-friendly markup with props passed from PHP. Includes Symfony bundle integration and Twig helpers for easy embedding.

View on GitHub
Deep Wiki
Context7

Limenius ReactRenderer brings server-side rendering of React components to PHP. It executes your bundled React app in the embedded V8Js JavaScript engine, so pages arrive with fully rendered HTML—improving SEO and first paint without running Node.js in production.

Designed for Symfony/Twig integration, it exposes a renderer service and template helper to render components with props and optional Redux state.

  • Render React components to HTML from PHP
  • Supports props and preloaded Redux stores
  • Twig/Symfony service integration
  • Configurable bundles and rendering modes
  • Pairs with client-side hydration
Frequently asked questions about React Renderer
Can I use limenius/react-renderer in a Laravel application?
Yes, but realistically only the framework-agnostic core classes under Limenius\ReactRenderer\Renderer. The package's main value-add is a Symfony bundle (limenius/react-bundle) that contributes a Twig extension, DI configuration and webpack-encore integration, none of which applies to Laravel. You would bind a renderer into the Laravel container yourself and replace the Twig helper with a Blade directive or helper.
How do I install limenius/react-renderer with Composer?
Running composer require limenius/react-renderer pulls in the core renderer plus nacmartin/phpexecjs as a transitive dependency. There is no Laravel service provider, config file or package auto-discovery, so you must register your own container bindings. Verify that your PHP version resolves cleanly, since the last release (January 2022) targets the PHP 7.4/8.0 era.
What is the difference between PhpExecJsReactRenderer and ExternalServerReactRenderer?
PhpExecJsReactRenderer executes the JavaScript bundle in-process through V8Js or a node shell-out, so React runs inside your PHP workers. ExternalServerReactRenderer sends an HTTP or socket request to a long-running Node process that renders the component and returns markup. The external mode is operationally cleaner because a crash is isolated to a separate service, whereas a V8Js segfault can take down PHP-FPM workers.
Do I need the V8Js PHP extension to server-render React with this package?
Only if you choose PhpExecJsReactRenderer, which relies on nacmartin/phpexecjs and prefers the V8Js extension with a node binary fallback. The external-server strategy needs no PHP extension at all, just a reachable Node renderer. Most production deployments that use this package pick the external server for exactly that reason.
Does limenius/react-renderer support React 18 streaming or Suspense?
No. The contract is string-in, string-out rendering, with no concept of renderToPipeableStream, Suspense-based async data or selective hydration. The package was built for the React 16/17 era and last shipped in January 2022. If you need React 18 or 19 features, use Inertia SSR or a current Node-side renderer instead.
Is limenius/react-renderer still maintained?
No. The last release was 2022-01-14, there is no vendor backing it, and it has roughly 242 GitHub stars with effectively zero Packagist dependents. Any bug or PHP 8.2/8.3 incompatibility you hit is yours to fix. Treat it as an architecture reference rather than a long-term dependency.
How do I render React components from Blade instead of Twig?
Write a small Blade directive or helper such as @react('ComponentName', $props) that calls your bound renderer and echoes the returned HTML. Pass the same props to the client through a JSON script tag or data attribute so React can hydrate the server markup. The package ships no Blade integration, so this glue code is entirely yours.
What are the alternatives to limenius/react-renderer for Laravel?
spatie/laravel-server-side-rendering and Inertia's SSR mode cover the same topology with active maintenance and Laravel-native ergonomics. For a handful of SEO or marketing routes, build-time prerendering removes the dependency entirely and is usually the right call. The React on Rails pattern this package implements predates both options.
How do I avoid hydration mismatches when server-rendering React from PHP?
Render deterministic markup: avoid window, document, Date.now(), Math.random() and generated IDs during the server pass, or inject them as props instead. The package provides no guardrails, so mismatches surface as silent, hard-to-triage client errors. An integration test that compares the server HTML against the first client render catches most of them.
What should happen if the Node renderer is down in production?
Decide explicitly between returning a 500 and falling back to client-side rendering with an empty or loading shell. Wrapping the render call behind an HtmlRenderer interface with an SSR implementation and a CSR-only stub makes that fallback a one-line config change. You also own health checks, restart policy and CVE patching for the Node process, since the package provides none of that.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console