Skip to content
/ obnano Public

micro-js evergreen framework, ulit (lit-html inspired) + post-js (Mobx-state-tree inspired) in <6kB bundle

License

Notifications You must be signed in to change notification settings

andyrj/obnano

Repository files navigation

obnano

npm version Codacy Badge Codacy Badge Build Status

obnano = tagged template literal view (lit-html like library) + proxied observable state tree (mobx-state-tree like library) + html5 pushState router

npm install --save obnano

import { app, Store, autorun, html, ob } from "obnano";

const header = html`<div>Header markup here...</div>`;
const footer = html`<div>Footer markup here...</div>`;

const layout = store => html`
  ${header}
  <div>
    ${ob(() => store.count)}
  </div>
  <div>
    <button onclick=${store.increment} />
  </div>
  ${footer}
`;

app(Store(
  { 
    count: 0
  }, 
  { 
    increment(ctx) {
      ctx.count += 1;
    }
  }
), layout);

License

obnano is MIT licensed. See LICENSE.

About

micro-js evergreen framework, ulit (lit-html inspired) + post-js (Mobx-state-tree inspired) in <6kB bundle

Resources

License

Stars

Watchers

Forks

Packages

No packages published