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); | |
}; |
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
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
#!/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 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 | |
# 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
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
(* Same example as https://gist.github.com/jordwalke/67819c91df1552009b22 | |
but using OCaml's simple module feature (every file is a module) *) | |
open ReactDOM | |
(* Component Properties *) | |
type props = {count: int} | |
(* Hey, state can be any type! *) | |
type state = string |
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
# IMPORTANT: Read through this carefully to make sure you want it to do | |
# everything you'd like. You should actually run through this line by line | |
# instead of blindly running this. Specifically, you should never curl | |
# a script and run it without first reading it! (See the opam_installer portion) | |
# License: See the License at the footer of this document: | |
# 1. OPAM: |
OlderNewer