mobx-toastr
Version:
Tiny Mobx wrapper around Toastr notifications library.
46 lines (29 loc) • 1.03 kB
Markdown
> Tiny Mobx wrapper around toastr notifications library.
[](https://www.npmjs.com/package/mobx-toastr)
[](https://travis-ci.org/padsbanger/mobx-toastr)
[](https://standardjs.com)
```bash
npm install --save mobx-toastr
```
```jsx
import React, { Component } from 'react'
import Toastr from 'mobx-toastr'
import '../node_modules/toastr/build/toastr.css';
const options = {
closeButton: false
}
const Root = (
<Provider Toastr={new Toastr(options)}>
<App />
</Provider>
)
ReactDOM.render(Root, document.getElementById('root'))
```
Working [example](http://michal-lach.pl/mobx-toastr/).
For detailed documentation look [here](https://github.com/CodeSeven/toastr).
MIT © [padsbanger](https://github.com/padsbanger)