rwc
v6.0.2
Published
create reactive webcomponents
Maintainers
Readme
rwc (BETA)
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 --saveParadigm
A component is made up of Four pure functions.
init(): Provides the initial stateSof the component.update(a: Action, s: State): A reducer function like that in [Redux] that takes an inputstateand based on theactionreturns a new output state.view(e: Emitter, s: State): The view function converts thestateinto a virtual DOM tree. Additionally it also gets an instance of theEmitterthat can be used to handle events.command(a: Action, s: State): Thecommand()function is like theupdate()function except that it return an object of typeCommand.
