literium
v0.2.0
Published
Ultra lightweight web-application framework.
Downloads
7
Maintainers
Readme
Literium Web-application framework
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.