« 🌌 Quantum-Entangled Modules Demo

Decouple your UI and data management. Communicate via events for true modularity—no direct references, no import spaghetti.

Use When: You want to build modular apps where data and UI are developed independently, or when building micro-frontend architectures.

Independent modules that communicate through event dispatch without coupling.

Event-driven architecture in minutes and zero configuration.

Note: Runs directly on file:// protocol like all YpsilonEventHandler examples - just download and open in browser! (Requires internet for CDN library access)

User Interface Module
Data Manager Module

Event Log:

What has this to do with Ypsilon?

In this example, we use YpsilonEventHandler as Subscriber System to subscribe and dispatch Events.

YpsilonEventHandler provides 2 ways to subscribe:

// Subcribe immediately via document selector in the constructor
constructor() {
    super({
        document: [
            { type: 'worker-result', handler: 'displayResult' },
        ]
    });
}

// Or on the fly. It will listen immediately after adding
this.addEvent('document', { type: 'worker-result', handler: 'displayResult' });