Skip to content

Instantly share code, notes, and snippets.

@insin
Last active July 6, 2018 23:08
Show Gist options
  • Save insin/9c0712cef6ac8583b742 to your computer and use it in GitHub Desktop.
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)
<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>
<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>
<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>
@insin
Copy link
Author

insin commented Feb 17, 2015

Just forgot to put a filename in :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment