Guest User

Untitled

a guest
May 21st, 2018
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. import React, { Component } from 'react';
  2. import NodeCGReplicant from './NodeCGReplicant';
  3.  
  4. class HelloWorld extends Component {
  5.  
  6. state = {
  7. hello: 'world'
  8. };
  9.  
  10. render() {
  11. return (
  12. <div>
  13. <input
  14. type="text"
  15. value={this.state.hello}
  16. onChange={(e) => {this.setState({hello e.target.value})}}
  17. />
  18. <NodeCGReplicant
  19. replicantName='hello'
  20. value={this.state.hello}
  21. onNewValue={(newValue, oldValue) => {this.setState({bla: newValue})}}
  22. />
  23. </div>
  24. );
  25. }
  26. }
  27.  
  28. export default HelloWorld;
Add Comment
Please, Sign In to add comment