Get started with omi CDN

MIT licensed

Omi: Lightweight JS library for dynamic UIs, with virtual DOM and component architecture.

Tags:
  • omi
  • webcomponents
  • jsx
  • proxy
  • preact
  • react
  • virtual dom
  • vdom
  • components
  • virtual
  • dom

Stable version

Copied!

How to start using omi CDN


// Include OMI library from the CDN
const OMI = require('omi/omi.umd.js');

// Define a component called 'HelloWorld'
class HelloWorld extends OMI.Component {
  render() {
    return (
      <div class="hello-world">
        <h1 ref="title">Hello, World!</h1>
      </div>
    );
  }
}

// Mount the component to an element with id 'app'
OMI.mount(document.getElementById('app'), HelloWorld);
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!

All versions