Class: PuerroController

PuerroController($root, state, view, diffing)

Abstract controller to use a MVC approach using the virtual DOM as a renderer.

Constructor

new PuerroController($root, state, view, diffing)

Creating a new PuerroController

Parameters:
Name Type Default Description
$root HTMLElement

DOM element to mount view

state object

initial state

view function

Virtual DOM creator

diffing boolean true

if diffing should be used

Source:

Members

(static) store

Static method for returning the store

Source:

model

Returns the model (store and state)

Source:

store

Returns the store

Source:

Methods

init()

Initial function of the Puerro Controller

Source:

onInit()

On Init Hook

Source:

refresh()

Refreshs the view

Source:

repaint(newVDom)

Repaint the virtual DOM using the DOM API

Parameters:
Name Type Description
newVDom VNode

vDom to be paintend

Source: