Created
May 18, 2018 23:40
-
-
Save kfarst/b90b2ba2c16f90aed983562e1759e3de to your computer and use it in GitHub Desktop.
This file contains 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 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