Writing hyperscript can get tedious when repeating this syntax for every element.
h('div', 'this is an element', [
h('ul', [
h('li', 'writing all these h calls')
h('li', 'can get boring...')
])
])
Instead it would be nicer to express the same thing but as arrays:
['div', 'this is an element',
['ul',
['li', 'much better'],
['li', 'about as clean as it can get...']
]
]
This gist offers a single algorithm to convert an array tree into a vTree to make the development experience a bit nicer.
Here is a sample jsbin