Last active
July 6, 2018 23:08
-
-
Save insin/9c0712cef6ac8583b742 to your computer and use it in GitHub Desktop.
Templates for code snippets for various UI libraries in Stack Overflow answers (or anywhere else, really)
This file contains 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
<meta charset="UTF-8"> | |
<script src="https://npmcdn.com/[email protected]/mithril.js"></script> | |
<script src="https://npmcdn.com/[email protected]/dist/MSXTransformer.js"></script> | |
<div id="app"></div> | |
<script type="text/msx;harmony=true">void function() { 'use strict'; | |
var App = { | |
view(ctrl, attrs) { | |
return <h1>Hello {attrs.who}!</h1> | |
} | |
} | |
m.mount(document.querySelector('#app'), <App who="world"/>) | |
}()</script> |
This file contains 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
<meta charset="UTF-8"> | |
<script src="https://npmcdn.com/[email protected]/dist/react.js"></script> | |
<script src="https://npmcdn.com/[email protected]/dist/react-dom.js"></script> | |
<script src="https://npmcdn.com/[email protected]/browser-polyfill.min.js"></script> | |
<script src="https://npmcdn.com/[email protected]/browser.min.js"></script> | |
<div id="app"></div> | |
<script type="text/babel"> | |
var App = React.createClass({ | |
render() { | |
return <h1>Hello {this.props.who}!</h1> | |
} | |
}) | |
ReactDOM.render(<App who="World"/>, document.querySelector('#app')) | |
</script> |
This file contains 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
<meta charset="UTF-8"> | |
<script src="https://npmcdn.com/[email protected]/riot+compiler.js"></script> | |
<app></app> | |
<script type="riot/tag"> | |
<app> | |
<h1>Hello {opts.who}!</h1> | |
</app> | |
</script> | |
<script> | |
riot.mount('app', {who: 'World'}) | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just forgot to put a filename in :)