How to use the cyclejs.applyToDOM function in cyclejs

To help you get started, we’ve selected a few cyclejs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github staltz / rxmarbles / src / app.js View on Github external
var appView = require('rxmarbles/app-view');
var operatorsMenuLinkComponent = require('rxmarbles/components/operators-menu-link');
var operatorsMenuComponent = require('rxmarbles/components/operators-menu');
var sandboxComponent = require('rxmarbles/components/sandbox/sandbox');
var diagramComponent = require('rxmarbles/components/diagram/diagram');
var marbleComponent = require('rxmarbles/components/marble');
var diagramCompletionComponent = require('rxmarbles/components/diagram-completion');

Cycle.registerCustomElement('x-operators-menu-link', operatorsMenuLinkComponent);
Cycle.registerCustomElement('x-operators-menu', operatorsMenuComponent);
Cycle.registerCustomElement('x-sandbox', sandboxComponent);
Cycle.registerCustomElement('x-marble', marbleComponent);
Cycle.registerCustomElement('x-diagram-completion', diagramCompletionComponent);
Cycle.registerCustomElement('x-diagram', diagramComponent);

Cycle.applyToDOM('.js-appContainer', function app() {
  return appView(appModel());
});