⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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 work is free. You can redistribute it and/or modify it under the | |
* terms of the Do What The Fuck You Want To Public License, Version 2, | |
* as published by Sam Hocevar. See the COPYING file for more details. | |
*/ | |
/* | |
* Easing Functions - inspired from http://gizma.com/easing/ | |
* only considering the t value for the range [0, 1] => [0, 1] | |
*/ | |
EasingFunctions = { |
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
# ================================= | |
# DocPad Events | |
# Here we can define handlers for events that DocPad fires | |
# You can find a full listing of events on the DocPad Wiki | |
events: | |
# Server Extend | |
# Used to add our own custom routes to the server before the docpad routes are added | |
serverExtend: (opts) -> |
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 expect = chai.expect; | |
describe('services', function(){ | |
var goat, monkey, monkey2, Donkey, tiger1, tiger2, lion; | |
beforeEach(function(){ | |
//load the module | |
module('app'); | |
//configure providers |
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 dessertRank(dessert) { | |
return dessert === "muffins" ? "good" | |
: dessert === "brownies" ? "pretty good" | |
: dessert === "cupcakes" ? "great" | |
: dessert === "cookies" ? "amazing" | |
: dessert === "cake" ? "omg" | |
: dessert === "ice cream" ? "dying" | |
: "probably pretty great" |
All libraries have subtle rules that you have to follow for them to work well. Often these are implied and undocumented rules that you have to learn as you go. This is an attempt to document the rules of React renders. Ideally a type system could enforce it.
A number of methods in React are assumed to be "pure".
On classes that's the constructor, getDerivedStateFromProps, shouldComponentUpdate and render.