Last active
November 19, 2017 12:39
-
-
Save sajithdilshan/b38201fc1a19cac76d3feaa78e78b704 to your computer and use it in GitHub Desktop.
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
import React, { Component } from 'react'; | |
import Alice from './Alice'; | |
class App extends Component { | |
constructor() { | |
super(); | |
this.state = { | |
greeting: "Hello World!", | |
parentMessage: "Hello Alice!" | |
} | |
setTimeout(() => { | |
this.setState({greeting : "Hello World Updated!"}) | |
}, 10000) | |
} | |
render() { | |
return ( | |
<div className="greeting"> | |
<h1> {this.state.greeting} </h1> | |
<Alice newMsg={this.state.parentMessage} /> | |
</div> | |
); | |
} | |
} | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment