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
class Hello extends React.Component { | |
constructor() { | |
this.handleIncrement = this.handleIncrement.bind(this) | |
this.state = { | |
currentIndex: 0 | |
} | |
} |
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
for env in `cat .env`; | |
do heroku config:set $env; | |
done; |
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
#!/usr/bin/zsh -e | |
sites=('your' 'array' 'of' 'sites') | |
for i in $sites; do | |
echo "$i\n------" | |
cd $i | |
heroku stack:set cedar-14 | |
git commit --allow-empty -m "Upgrading to Cedar-14" | |
git push origin master |
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
{ | |
"parser": "babel-eslint", | |
"plugins": ["react"], | |
"env": { | |
"es6": true, | |
"browser": true, | |
"node": true, | |
"mocha": true | |
}, | |
"rules": { |
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
import React from 'react' | |
@import './components/dropdown.scss' | |
const _OPTIONS = [ | |
{name: 'one'} | |
{name: 'two'} | |
] | |
class Dropdown extends React.Component { |
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
const RadioBtnGroup = React.createClass({ | |
getDefaultProps() { | |
return { | |
options: [] | |
} | |
} | |
handleValueChange(evt) { | |
this.setState({ | |
value: evt.currentTarget.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
const AppComponent = React.createClass({ | |
getInitialState() { | |
return { | |
currentIndex: 0 | |
} | |
}, | |
handleSave(data, method) { | |
if (method === 'POST') { | |
PostAction.save(data) |
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
export default class MessageView extends React.Component { | |
constructor(props) { | |
super(props) | |
let ds = new ListView.DataSource({ | |
rowHasChanged: (row1, row2) => row1 !== row2 | |
}) | |
this.state = { | |
dataSource: ds.cloneWithRows([]), |
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
export default class MessageView extends React.Component { | |
constructor(props) { | |
super(props) | |
this.state = { messages: MessageStore.getMessages() } | |
} | |
componentWillMount() { | |
MessageStore.listen(this.onChange.bind(this)) | |
} |
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
103 function setUpXHR() { | |
104 // The native XMLHttpRequest in Chrome dev tools is CORS aware and won't | |
105 // let you fetch anything from the internet | |
106 GLOBAL.XMLHttpRequest = require('XMLHttpRequest'); // COMMENT OUT | |
107 GLOBAL.FormData = require('FormData'); // COMMENT OUT | |
108 | |
109 var fetchPolyfill = require('fetch'); // COMMENT OUT | |
110 GLOBAL.fetch = fetchPolyfill.fetch; // COMMENT OUT | |
111 GLOBAL.Headers = fetchPolyfill.Headers; // COMMENT OUT | |
112 GLOBAL.Request = fetchPolyfill.Request; // COMMENT OUT |