Last active
September 19, 2021 20:13
-
-
Save dance2die/e7108c9dc2d25e2a3d651b427965f425 to your computer and use it in GitHub Desktop.
This file contains 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 Greeting extends Component { | |
hello = id => console.log(`hello world! - ${id}`); | |
componentDidMount() { | |
const id = shortid.generate(); | |
setInterval(e => this.hello(id), 1000); | |
} | |
componentWillUnmount() { | |
console.log("Greeting unmounted..."); | |
} | |
render() { | |
return ( | |
<div> | |
<Link to="/main">Go to Main Page</Link> | |
</div> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment