New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ome

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ome

data driven javascript frontend library, based on JSX

latest
Source
npmnpm
Version
0.5.2
Version published
Maintainers
1
Created
Source

omega

ONE STATE, ONE APP!

A simple data driven frontend library using JSX.

There are some major differences to render based libraries like React:

  • no render cycle, no shadow DOM, no complicated change detection
  • data is set with observables
npm i -S ome

example:

import {omega, Store} from 'ome';

const App = (props, state, data) => {
  const entries = data.entries.map(
    (value) => (
      <span style={
        value.transform(v => v && {color: v.color})
      }>
        {value.child('title')}
      </span>
    )
  );

  return (
    <div className="app">
      <h1>{props.title}</h1>
      <p>{entries}</p>
    </div>
  );
};

App.data = {
  entries: 'app',
};

const initialState = {
  'app': [
    {title: 'Hello', color: '#fe8d00'},
    {title: 'World', color: '#333333'},
  ],
};

export const store = new Store(initialState);

omega.render(
  <App title="Omega is awesome!"/>,
  document.body,
  store,
);

Keywords

redux

FAQs

Package last updated on 27 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts