Reactive Web Components (RWC)
TypeScript
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
test
.gitignore
.npmignore
.travis.yml
LICENSE.md
README.md
global.d.ts
index.ts
package.json
tsconfig.json
tslint.json
typings.json
yarn.lock

README.md

rwc (BETA)

Build Status npm

RWC is tiny framework for creating web-components that is heavily inspired by ELM. The approach is an attempt to find a balance between a scalable paradigm and performance.

Installation

npm install rwc --save

Paradigm

A component is made up of Four pure functions.

  • init() : Provides the initial state S of the component.
  • update(a: Action, s: State): A reducer function like that in [Redux] that takes an input state and based on the action returns a new output state.
  • view(e: Emitter, s: State): The view function converts the state into a virtual DOM tree. Additionally it also gets an instance of the Emitter that can be used to handle events.
  • command(a: Action, s: State): The command() function is like the update() function except that it return an object of type Command.