Skip to content

Instantly share code, notes, and snippets.

@dance2die

dance2die/Greeting.js

Last active Sep 15, 2018
Embed
What would you like to do?
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