Skip to content

Instantly share code, notes, and snippets.

@kfarst
Created May 18, 2018 23:40
Show Gist options
  • Save kfarst/b90b2ba2c16f90aed983562e1759e3de to your computer and use it in GitHub Desktop.
Save kfarst/b90b2ba2c16f90aed983562e1759e3de to your computer and use it in GitHub Desktop.
class TodoItem extends React.Component {
render() {
const item = this.props.item;
// ...
}
}
export default createFragmentContainer(
TodoItem,
item: graphql`
# Fragment name uses underscore to denote property name
fragment TodoItem_item on Todo {
# Properties available on the item component property
text
isComplete
}
`,
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment