Skip to content

Instantly share code, notes, and snippets.

@helielson
Last active October 29, 2018 03:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save helielson/362bb2d14bb41a8a6a8ca1de59cdbeba to your computer and use it in GitHub Desktop.
Save helielson/362bb2d14bb41a8a6a8ca1de59cdbeba to your computer and use it in GitHub Desktop.
class ProfileName extends React.Component {
componentDidMount() {
profileInfoViewed('ProfileName', this.props.profile);
}
render() {
return (
<View>
<Text>{this.profile.name}</Text>
</View>
);
}
}
export default createRefetchContainer(ProfileName, graphql`
fragment ProfileName_profile on Profile {
name
...eventsProfileInfoViewedFragment @relay(mask: false)
}
`);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment