DEV Community

Discussion on: Redesigning a framework

Collapse
 
jvanbruegge profile image
Jan van Brügge

The gist sounds about right, but one of the main benefits of this is purity. Side effects (writing to the DOM, making HTTP requests, even time based functions like requestAnimationFrame) are only in the producers/consumers (the two sides of the driver). Your whole app only reads events and issues commands, but never does any side effects itself. This makes tracing bugs and also testing much easier