npm install rwc --save
A component is made up of Four pure functions.
init(): Provides the initial state
Sof the component.
update(a: Action, s: State): A reducer function like that in [Redux] that takes an input
stateand based on the
actionreturns a new output state.
view(e: Emitter, s: State): The view function converts the
stateinto a virtual DOM tree. Additionally it also gets an instance of the
Emitterthat 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