Cycle.js is a reactive JavaScript framework that uses RxJS streams to manage data flow in applications. It follows a unidirectional data flow model where drivers like DOMDriver handle interactions that produce events, which update models that then produce views. The document demonstrates how Cycle.js can be used to build a simple toggle component and compose it into a larger application to manage multiple toggled states through streams.
5. Proactive
• Foo invokes the action
• Bar has an API for interaction
• ‘Find usages’
Foo Bar
Proactive Passive
function onClick() {
Bar.increment();
}
Foo