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
function foo() { | |
return ( | |
<div> | |
<h1>Events</h1> | |
<table> | |
<thead> | |
<tr> | |
<th>{ /*Sign up link*/ }</th> | |
<th>{ /*Name */ }</th> | |
<th>Places available</th> |
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
function foo() { | |
return ( | |
<div> | |
<h1>Events</h1> | |
<table> | |
<thead> | |
<tr> | |
<th>{/*Sign up link*/}</th> | |
<th>{/*Name */}</th> | |
<th>Places available</th> |
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
(sc/defschema NonNegInt | |
"Schema for a non-negative integer." | |
(sc/both | |
sc/Int | |
(sc/pred (fn is-positive [key] (>= key 0))))) | |
(sc/defschema PosInt | |
"Schema for a positive integer." | |
(sc/both | |
sc/Int |
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
//this is how the code gets indented in web-mode 20140927.1330 from melpa | |
eventStore.dispatchToken = dispatcher.register(function(payload) { | |
switch(payload.action.type) { | |
case actionTypes.REQUEST_EVENT_SUCCESS: | |
doSomething(); | |
break; | |
} | |
}); |
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
/** @jsx React.DOM */ | |
//Indentation produced by web-mode | |
var Component = React.createClass({ | |
render : function() { | |
var stuff = this.props.formElements.map(function(elem) { | |
switch(elem) { | |
case "textarea" : | |
return ( <textarea rows="4" /> ); |