literium
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

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.

Package Sidebar

Install

npm i literium

Weekly Downloads

5

Version

0.2.0

License

MIT

Unpacked Size

42.2 kB

Total Files

54

Last publish

Collaborators

  • kayo