This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class GateKeeper extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| input: '' | |
| }; | |
| this.handleChange = this.handleChange.bind(this); | |
| } | |
| handleChange(event) { | |
| this.setState({ input: event.target.value }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Results extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| } | |
| render() { | |
| return ( | |
| <h1> | |
| {this.props.fiftyFifty} | |
| </h1> | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const inputStyle = { | |
| width: 235, | |
| margin: 5 | |
| } | |
| class CheckUserAge extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| // change code below this line | |
| this.state = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MyComponent extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| display: true | |
| } | |
| this.toggleDisplay = this.toggleDisplay.bind(this); | |
| } | |
| toggleDisplay() { | |
| this.setState(state => ({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const inputStyle = { | |
| width: 235, | |
| margin: 5 | |
| } | |
| class MagicEightBall extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| userInput: '', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const styles = { | |
| color: "purple", | |
| fontSize: 40, | |
| border: "2px solid purple" | |
| } | |
| // change code above this line | |
| class Colorful extends React.Component { | |
| render() { | |
| // change code below this line | |
| return ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MyComponent extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| message: '' | |
| }; | |
| this.handleEnter = this.handleEnter.bind(this); | |
| this.handleKeyPress = this.handleKeyPress.bind(this); | |
| } | |
| // change code below this line |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MyComponent extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| message: '' | |
| }; | |
| this.handleEnter = this.handleEnter.bind(this); | |
| this.handleKeyPress = this.handleKeyPress.bind(this); | |
| } | |
| // change code below this line |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MyComponent extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| activeUsers: null | |
| }; | |
| } | |
| componentDidMount() { | |
| setTimeout( () => { | |
| this.setState({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MyApp extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| inputValue: '' | |
| } | |
| this.handleChange = this.handleChange.bind(this); | |
| } | |
| handleChange(event) { | |
| this.setState({ |