0.2.0 • Published 6 years ago

literium v0.2.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

Literium Web-application framework

npm version npm downloads Build Status

Ultra lightweight client-oriented Web-application framework.

Architecture

The data flow is similar to Elm-arch and simplified Redux.

Types

Basic component definition may looks like so:

export interface Create<State, Event> {
    (fork: Fork<Event>): State;
}

export interface Update<State, Event> {
    (state: Readonly<State>, event: Event, fork: Fork<Event>): State;
}

export interface Render<State, Event> {
    (state: Readonly<State>, send: Send<Event>): VNodeChild;
}

export interface Component<State, Event> {
    create: Create<State, Event>;
    update: Update<State, Event>;
    render: Render<State, Event>;
}

Usually you implement your application as component like shown above which can be turned on using runners from literium-runner package.