Skip to content

Instantly share code, notes, and snippets.

@martinrusev
Created May 26, 2014 06:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save martinrusev/79ab56834400f68ddf25 to your computer and use it in GitHub Desktop.
Save martinrusev/79ab56834400f68ddf25 to your computer and use it in GitHub Desktop.
React notificitations
/** @jsx React.DOM */
var Notification = React.createClass({
componentDidMount: function() {
setTimeout(function() {
React.unmountComponentAtNode(document.getElementById('react-container'));
}, 3000);
},
render: function() {
return <ul className="message small floating">
<li>{ this.props.text }</li>
</ul>;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment