0.7.3 • Published 5 years ago

@mjstahl/elementree v0.7.3

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

Elementree

"Make everything as simple as possible, but not simpler."

We think that might look something like Pushdown Automata + JS Template Literals. At least for web development.

A Simple Toggle Example

const { attach, prepare, render } = require('@mjstahl/elementree')

function template (model, app) {
  return render`
    <body>
      <p>${model.value}</p>
      <button onclick=${toggle}>
        Toggle
      </button>
    </body>
  `

  function toggle () {
    model.to(model.actions.TOGGLE)
  }
}

const state = {
  initial: 'hello',
  hello: {
    value: 'Hello',
    TOGGLE: 'goodbye'
  },
  goodbye: {
    value: 'Goodbye',
    TOGGLE: 'hello'
  }
}

prepare(template, state)
attach('body')
0.7.3

5 years ago

0.7.2

5 years ago

0.7.0

5 years ago

0.6.0

5 years ago

0.5.1

5 years ago

0.5.0

5 years ago

0.4.2

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.0

5 years ago

0.2.0

5 years ago