Create MVC style Views and View classes. This is a highly experimental project aiming to find a nice composable style of defining interface components. Major influencers are the component entity systems which are becoming popular in game development. Though it also aims to allow inheritance. In presenter, components play the role of mixins though you can also think of them as providing a form a multiple inheritance.
$ {package mananger} install jkroso/presenter
then in your app:
var view = require('presenter')
Create a new View class. if template
is a function it
will be passed model
and can return either an Element
or an HTML string.
var P = view('<p>{body}</p>')
new P({ body: 'some text' }).el
// <p>some text</p>
Experimental: Expect the unexpected. Please provide feedback on api and your use-case.
Just run make
and navigate to the test directory