Using React
React is a library that makes it possible to event-driven programming in PHP, much like JavaScript does. Based on the reactor pattern, it essentially acts as an event loop, allowing various other third-party libraries using its components to write asynchronous code.
The page at https://en.wikipedia.org/wiki/Reactor_pattern states, The reactor design pattern is an event handling pattern for handling service requests delivered concurrently to a service handler by one or more inputs.Â
The library is available at https://github.com/reactphp/react
Installing React
The React library is available as a Composer react/react
 package. Assuming we are still in our project directory where we installed RxPHP, we can simply execute the following command in order to add React to our project:
composer require react/react
This should give us an output similar to the following one:
We can see quite a few interesting react/*
packages being pulled in, react/event-loop
 being one of them. The messages suggesting...