Created
          February 9, 2016 06:58 
        
      - 
      
 - 
        
Save JamesUlph/a5996cdfa887f5ad37f5 to your computer and use it in GitHub Desktop.  
Revisions
- 
        
JamesUlph created this gist
Feb 9, 2016 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ made with [esnextbin](http://esnextb.in) 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ <!doctype html> <html> <head> <meta charset="utf-8"> <title>ESNextbin Sketch</title> <style> body > div { padding:40px; } </style> </head> <body> <!-- put markup and other contents here --> </body> </html> 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ import { h, render } from 'preact-cycle'; /** @jsx h */ const App = ({ value, mutation }) => ( <div> <button onClick={ mutation('value', v => v+1) }>Increment</button> <p>Value: { value }</p> <p>{value}</p> </div> ); render(App, { value: 0 }, document.body); 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ { "name": "esnextbin-sketch", "version": "0.0.0", "dependencies": { "preact-cycle": "0.1.1" } } 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,34 @@ 'use strict'; var _preactCycle = require('preact-cycle'); /** @jsx h */ var App = function App(_ref) { var value = _ref.value; var mutation = _ref.mutation; return (0, _preactCycle.h)( 'div', null, (0, _preactCycle.h)( 'button', { onClick: mutation('value', function (v) { return v + 1; }) }, 'Increment' ), (0, _preactCycle.h)( 'p', null, 'Value: ', value ), (0, _preactCycle.h)( 'p', null, value ) ); }; (0, _preactCycle.render)(App, { value: 0 }, document.body);