github.com/jepp2078/gqlgen@v0.7.2/example/chat/src/App.js (about) 1 import React, { Component } from 'react'; 2 import Room from './Room'; 3 4 class App extends Component { 5 constructor(props) { 6 super(props); 7 8 this.state = { 9 name: 'tester', 10 channel: '#gophers', 11 } 12 } 13 render() { 14 return (<div> 15 name: <br/> 16 <input value={this.state.name} onChange={(e) => this.setState({name: e.target.value })} /> <br /> 17 18 channel: <br /> 19 <input value={this.state.channel} onChange={(e) => this.setState({channel: e.target.value })}/> <br/> 20 21 <Room channel={this.state.channel} name={this.state.name} /> 22 </div> 23 ); 24 } 25 } 26 27 28 export default App;