hyperscript - nodebotschs/nodebotsday-editor GitHub Wiki

What is hyperscript?

Hyperscript is a template language in JavaScript, this language makes it easy to write markup using javascript. This means that you can abstract the boilier plate of creating complex presentation components using pure javascript.

function render (state) {
  return h('h1', ['Hello World'])
}

This example provides:

<h1>Hello World</h1>

There is also another module called hyperscript-helpers that provide some sugar to the generic hyperscript pattern.

var h = require('hyperscript')
var _ = require('hyperscript-helpers')

function () {
  return _.div([
    _.h1('Hello Planet')
  ])
}

This example uses hyperscript-helpers to make it easier to reason about.

Give hyperscript a try, if you are having problems or having problems convincing yourself this is a good solution, feel free to reach out on slack to discuss further.

⚠️ **GitHub.com Fallback** ⚠️