An open API service indexing awesome lists of open source software.

https://github.com/aackerman/react-flash-queue

Client-side flash queue for React applications
https://github.com/aackerman/react-flash-queue

Last synced: 12 months ago
JSON representation

Client-side flash queue for React applications

Awesome Lists containing this project

README

          

# react-flash-queue

A messaging queue for the browser built with React.

![Example flash messages](https://raw.githubusercontent.com/aackerman/react-flash-queue/master/src/images/example.png)

## Usage

```js
var App = React.createClass({

mixins: [FlashQueue.Mixin],

componentDidMount: function() {
this.flash('notice', 'A friendly notice');
},

render: function() {
var queue = FlashQueue.DOM.queue;
return ;
}
});

React.renderComponent(, document.querySelector('body'));
```

The `FlashQueue.Mixin` extends the host a `flash` method to create new flashes. The `flash` method modifies `this.props.messages` on the host object. And expects `this.props.messages` will be passed as the `messages` prop for a queue instance.

## Author

| [![twitter/_aaronackerman_](http://gravatar.com/avatar/c73ff9c7e654647b2b339d9e08b52143?s=70)](http://twitter.com/_aaronackerman_ "Follow @_aaronackerman_ on Twitter") |
|---|
| [Aaron Ackerman](https://twitter.com/_aaronackerman_) |