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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<!-- Meta --> | |
<meta charset="UTF-8" /> | |
<title>My New Pen!</title> | |
<!-- Styles --> | |
<link rel="stylesheet" href="style.css"> |
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
// Alternative 1 | |
// One function at top-level that returns whatever it needs. | |
// Can be run multiple times, and return different things | |
@firebase(props => { | |
if (!props.projectIndex) { | |
return { | |
projectIndex: `users/${props.authId}/projects`, | |
}; | |
} |
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
module['exports'] = function echoHttp (hook) { | |
console.log("Console messages are sent to /logs"); | |
console.log(hook.params); | |
console.log(hook.req.path); | |
console.log(hook.req.method); | |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 DeliveryAddress = React.createClass({ | |
render: function() { | |
var presets, | |
newAddress | |
if(this.props.user) { | |
presets = <RadioGroup handleChange={this.changePreset}> | |
<Radio name="deliveryPreset" key="2" checked>John Doe</Radio> | |
<Radio name="deliveryPreset" key="new">Other address</Radio> | |
</RadioGroup> |