Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React, { Component } from 'react';
- import NodeCGReplicant from './NodeCGReplicant';
- class HelloWorld extends Component {
- state = {
- hello: 'world'
- };
- render() {
- return (
- <div>
- <input
- type="text"
- value={this.state.hello}
- onChange={(e) => {this.setState({hello e.target.value})}}
- />
- <NodeCGReplicant
- replicantName='hello'
- value={this.state.hello}
- onNewValue={(newValue, oldValue) => {this.setState({bla: newValue})}}
- />
- </div>
- );
- }
- }
- export default HelloWorld;
Add Comment
Please, Sign In to add comment