Last active
May 4, 2017 01:11
-
-
Save jongacnik/93edd975e43c6a929d60b9328ee06267 to your computer and use it in GitHub Desktop.
bam frameworks → https://github.com/jongacnik/bam
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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