class Score extends React.Component {
render() {
var {initials, score} = this.props.score;
return (
<li key={initials}>
<strong>{initials}</strong> {score}
</li>
);
}
}
Score = Relay.createContainer(Score, {
fragments: {
score: () => Relay.QL`
fragment on Score {
initials,
score,
}
`,
},
});
Soo, if I understood well, first they create a class and then they create a global variable reusing the same name of the class, in order to create and object that expands the class?This Facebook people know how to make me uncomfortable. But I guess I could get used, the same way I got used to JSX...