Skip to content

Instantly share code, notes, and snippets.

@jongacnik
Last active May 4, 2017 01:11
Show Gist options
  • Save jongacnik/93edd975e43c6a929d60b9328ee06267 to your computer and use it in GitHub Desktop.
Save jongacnik/93edd975e43c6a929d60b9328ee06267 to your computer and use it in GitHub Desktop.
var byo = require('byo')
var preact = require('preact')
var hyperx = require('hyperx')
exports.framework = function () {
return byo({
mount: function (tree, root) {
return preact.render(tree, root)
},
render: function (tree, newTree, root) {
return preact.render(newTree, root, tree)
}
})
}
exports.h = preact.h
exports.html = hyperx(preact.h)
function Component () {}
Component.prototype = Object.create(preact.Component.prototype)
exports.component = Component
var choo = require('choo')
exports.framework = function () {
return choo()
}
exports.html = require('choo/html')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment