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
let Loop = React.createClass({ | |
getInitialState() { | |
return { | |
isMovingToEnd: true | |
}; | |
}, | |
endValue(currVals) { | |
let {endValueProp, isDone, startValue} = this.props; | |
let {isMovingToEnd} = this.state; |
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
import React, {Component} from 'react'; | |
import {TransitionSpring} from '../Spring'; | |
import {clone} from '../utils'; | |
const defaultTickAmount = 100; | |
const constConfig = [120, 10]; | |
class Demo extends Component { | |
state = { | |
someData: ["a", "b", "c", "d"] |
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
var request = require("request"); | |
var async = require("async"); | |
var fs = require("fs"); | |
function searchFor(searchQuery, pageNum, callback) { | |
for(var i = 0; i < pageNum; i++) { | |
(function(i) { | |
request.get("https://www.google.fr/search?q=" + searchQuery + "&start=" + i * 10, function(err, res) { | |
if(err) throw err; |
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
/*eslint-disable */ | |
import React from 'react'; | |
import {TransitionSpring} from '../../src/Spring'; | |
// debugging on mobile <3 | |
// console.log = function(...args){ | |
// let div = document.createElement('div'); | |
// div.textContent = JSON.stringify(args.join(' ')); | |
// let parent = document.querySelector('#content'); |
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
/*eslint-disable */ | |
import React, {PropTypes} from 'react'; | |
import {TransitionSpring} from '../src/Spring'; | |
const Demo = React.createClass({ | |
getInitialState() { | |
return { open: false }; | |
}, |
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
var request = require("request"); | |
var exec = require('child_process').exec; | |
var jar = request.jar(); | |
request = request.defaults({jar:jar}); | |
var async = require("async"); | |
var cheerio = require("cheerio"); | |
var fs = require("fs"); | |
var readline = require('readline'); |
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
/*eslint-disable */ | |
import React, {cloneElement} from 'react'; | |
import {TransitionSpring} from '../../src/Spring'; | |
var Counter = React.createClass({ | |
render: function() { | |
return <div className={this.props.className} style={{ | |
width: 100, height: 100, | |
backgroundColor: 'hsl(' + Math.ceil(Math.random() * 360) + ', 100%, 50%)', |
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
import React from 'react'; | |
import {Spring} from '../../src/Spring'; | |
const OnMount = React.createClass({ | |
getInitialState() { | |
return { | |
render: true | |
}; | |
}, |
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
/** | |
* Object syntax proposal. | |
* | |
* Look at Jordan's named arguments proposal to understand the named args | |
* syntax used here: | |
* https://gist.github.com/jordwalke/119fb44b95fdf7d703041f8ac54b5b4e | |
* | |
* This is building on top of the ideas here: | |
* https://github.com/facebook/reason/pull/767 | |
* |
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
/* | |
* vim: set ft=rust: | |
* vim: set ft=reason: | |
*/ | |
/* This is pretty cool because it allows us to keep track of what the previous .thenDo returned. | |
Look at the one below which makes the code look a bit closer to JS. | |
*/ | |
type promiseT 'a; |
OlderNewer