Home Manual Reference Source Repository

vulp

vulp is a user interface library with uni-directional dataflow.

Install

NPM

npm install --save-dev vulp

Starter Project

Usage

import { element, cycle, views, scopes, decorators } from 'vulp';

const { component, controller, dispatchChangeSets } = decorators;
const App = component(
  dispatchChangeSets(),
  controller({
    inc: ['/count', count => count + 1]
  }),
)(function({ context }) {
  return (
    <div>
      <input type='button' onClick='inc'/>
      {context.get('/count')}
    </div>
  );
});

const view = views.dom(document.body, App);
const scope = scopes.value({ count: 0 });

cycle(view, scope);

Architecture

overview

Api

vulp

vulp.scopes

vulp.views

vulp.decorators

Hack

git clone https://github.com/freemountain/vulp
cd vulp
npm install
npm run dev

... and click here

License

The MIT License (MIT)