A simple middleware for serving static files with ReactPHP
composer require ordinaryjellyfish/react-static
Use it in your ReactPHP like a normal middleware, passing in your webroot:
new OrdinaryJellyfish\ReactStatic\StaticServer(__DIR__);
The middleware will serve any static files if they exist. If a file does not exist for the requested path, the middleware will exit, letting you run the rest of your application.
Enjoy!