Skip to content

Instantly share code, notes, and snippets.

View jwdotjs's full-sized avatar
👨‍💻

Jason Walsh jwdotjs

👨‍💻
View GitHub Profile
@jwdotjs
jwdotjs / graphql-hoc.js
Last active August 15, 2016 14:00
GraphQL HOC
import {gql} from 'components/graphql-container';
export class Welcome extends React.Component {
static propTypes = {
id: React.PropTypes.number,
delayedUser: React.PropTypes.func.isRequired,
params: React.PropTypes.object.isRequired,
createAuditLog: React.PropTypes.object.isRequired,
}
function Person() {}
Person.prototype.withRelated = []
person = new Person();
person.withRelated.push(1);
console.log('1', person.withRelated);
person = new Person()
console.log('2', person.withRelated)
function Person() {}
Person.prototype.withRelated = []
person = new Person();
person.withRelated.push(1);
person = new Person()
console.log(person.withRelated)
function Person() { this.withRelated = [] }
person = new Person()
person.withRelated.push(1);
console.log('1', person.withRelated);
person = new Person()
console.log('2', person.withRelated)
{ key: 'value' }
{ key: 'value' }