Skip to content

Instantly share code, notes, and snippets.

@clayallsopp
Last active December 30, 2015 16:19
Show Gist options
  • Save clayallsopp/53bfca069f0526365819 to your computer and use it in GitHub Desktop.
Save clayallsopp/53bfca069f0526365819 to your computer and use it in GitHub Desktop.
class Explorer extends React.Component {
render() {
let currentKey = this.props.relay.variables.id;
return <div>
<input type='text' placeholder='Key' value={ currentKey } onChange={ this._onChange.bind(this) } />
<div>Key: { currentKey }</div>
<div>Value: { this.props.item.getValue.value }</div>
<hr />
<input type='text' placeholder='Key' ref='newKey' />
<input type='text' placeholder='Value' ref='newValue' />
<input type='button' value='Save' onClick={ this._onClick.bind(this) } />
</div>;
}
_onClick() {
// ...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment