Skip to content

Instantly share code, notes, and snippets.

View gregziegan's full-sized avatar
🇵🇸

Greg Ziegan gregziegan

🇵🇸
  • Columbus, OH
View GitHub Profile
@gregziegan
gregziegan / keybase.md
Created August 10, 2018 22:45
keybase.md

Keybase proof

I hereby claim:

  • I am thebritican on github.
  • I am gregziegan (https://keybase.io/gregziegan) on keybase.
  • I have a public key ASDzJwgiATsnT-myIw6cKt4fsQrK-1xPBT4UJq-VS7DviQo

To claim this, I am signing this object:

@gregziegan
gregziegan / graphql-example-medium-teaser.jsx
Last active January 17, 2016 18:16
GraphQL Example (Medium Teaser)
class LiveView extends React.Component {
render () {
const { contributor } = this.props;
return (
<div>
<h1>Hello {contributor.name}!</h1>
{contributor.novels.edges.map(edge => (
<Novel key={edge.node.id} novel={edge.node}/>
))}
</div>
@gregziegan
gregziegan / rest-endpoints-multiple-round-trips.js
Last active September 24, 2015 20:02
The problem with REST endpoints and state -- reading a simple hierarchical novel
class Reader extends React.Component {
componentWillReceiveProps (nextProps) {
const {
entities: { novels, chapters, words },
pagination: {
novelsByContributor, chaptersByNovel, wordsByChapter
}
} = nextProps;
const isFetchingChapters = chaptersByNovel[NOVEL_ID]