Skip to content

Instantly share code, notes, and snippets.

@lukaswelte
lukaswelte / relay-pass-variables-to-child-components-example.js
Last active May 4, 2019 20:50
Pass relay variables down to other components
class ChildComponent extends React.Component {
render() {
const {hello} = this.props.greetings;
return <h1>{hello}</h1>;
}
}
const ChildContainer = Relay.createContainer(ChildComponent, {
initialVariables: {
name: 'A',