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
open ReactDOM | |
module MyComponent = struct | |
(* Component Properties *) | |
type props = {count: int} | |
(* Hey, state can be any type! *) | |
type state = string | |
(* Initializer *) |
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
#!/bin/sh | |
set -e | |
# Just make sure there's a file called fileName.ml in the same directory | |
TARGET=fileName | |
# Disabling duplicate record warning (30) and non-opened record field names (40) | |
FLAGS="-libs unix,nums -cflags -w,-30,-w,-40" | |
OCAMLBUILD=ocamlbuild |
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 items = this.props.showThings ? this.props.items : []; | |
return ( | |
<ul> | |
{items.map(thing => <li>{thing}</li>)} | |
</ul> | |
); |
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
#!/bin/sh | |
set -e | |
TARGET=driver | |
# Disabling duplicate record warning (30) and non-opened record field names (40) | |
FLAGS="-libs unix,nums -cflags -w,-30,-w,-40" | |
OCAMLBUILD=ocamlbuild | |
ocb() |
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 x = | |
<svg | |
width="100%" | |
height="100%" | |
viewBox="0 0 700 700" | |
version="1.1" | |
style={{cursor: 'pointer'}} | |
onMouseDown={this.handleMouseDown} | |
onMouseUp={this.handleMouseUp}> | |
{this.renderGraphic(rotationStyle)} |
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
/** | |
* ReactJS: JavaScript like you've always done it. | |
* | |
* This example renders your top ten most followed friends/followers, `filter`ing | |
* only your favorites, and putting a star on all verified accounts. | |
* | |
* With ReactJS, any time your data changes, the UI is always brought up to date | |
* automatically. If friends length changes, or followCount - it always shows what | |
* `render` describes. | |
*/ |
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
/** | |
* ReactJS: JavaScript like you've always done it. | |
* | |
* This example renders your top ten most followed friends/followers, `filter`ing | |
* only your favorites, and putting a star on all verified accounts. | |
* | |
* With ReactJS, any time your data changes, the UI is always brought up to date | |
* automatically. If friends length changes, or followCount - it always shows what | |
* `render` describes. | |
*/ |
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
require.extensions['.jsx'] = function(module) { | |
module._compile(reactTools.transform(fs.readFileSync(module.filename, 'utf8')), module.filename); | |
}; |
NewerOlder