- "Print boarding pass" button does not work
- Uses Flash
- Non-native experience (weird scrolling, input fields, etc)
- Doesn't work on my phone
- Have to identify myself even though I'm already logged in on your website
- Too many steps, show my boarding pass on first screen
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 a = [ | |
1, | |
2, | |
3, // <-- Trailing comma for easier future edits | |
]; | |
// No trailing comma, adding a 4th element will require editing two lines | |
var b = [ | |
1, | |
2, |
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 React = require("react"); | |
var TabbedComponent = React.createClass({ | |
render: function() { | |
return TabsContainer({ | |
tabs: [ | |
// Pass instantiated component? | |
this.renderTab1(), | |
// Or pass function to create component? | |
this.renderTab1, |
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
"use strict"; | |
// A function that wraps a given `React.DOM.input`-like component to | |
// apply formatting to the value for display purposes. | |
// | |
// Example: | |
// | |
// var RoundedInput = createFormattedInput(React.DOM.input, { | |
// set: Math.round, | |
// }); |
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
function myCallback() { | |
console.log(foo); // undefined | |
} | |
function dothing(callback) { | |
var foo = "hello"; | |
callback(); | |
} |
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
/** @jsx React.DOM */ | |
"use strict"; | |
// An <input /> component that applies a format function to the value | |
// on initial render and when the element loses focus. | |
// | |
// Usage: | |
// | |
// <FormattedInput format={Math.round} valueLink={this.linkState("value")} /> | |
// |
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
/** @jsx React.DOM */ | |
"use strict"; | |
var React = require("react"); | |
// Usage: | |
// <ValidatedInput validateValue={myValidationFunction} | |
// onValidationError={handleError} | |
// valueLink={...} /> |
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
"use strict"; | |
var type = require("core-util-is"); | |
var slice = Array.prototype.slice; | |
// Return a className string from the given arguments | |
// | |
// Example: | |
// | |
// classes("foo", "bar") -> "foo bar" |
className
attribute instead ofclass
htmlFor
attribute instead offor
<textarea value="something">
instead of<textarea>something</textarea>
(see Why Textarea Value)<select value="something"><option value="something"></select>
instead of<select><option selected value="something"></select>
(see Why Select Value)- Whitespace (see discussion)
- [Tags must be closed and all tags can be self-closing][closing tags]
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 user = new User(); | |
user.set("name", "parshap"); | |
user.age("age", 5); | |
// Only save "name" to Mongo - leave "age" as a modified path in the docuemnt | |
user.save(["name"], function(err) { | |
// ... | |
}) |