Question: I'm using `react-toastify` and I can't get a simple toast to be rendered...

```
import React from "react";
import { toast } from 'react-toastify';

class MyView extends React.Component<{}, {}> {

    constructor() {
        super();
        this.state = {

        };
    }

    componentDidMount() {
        toast("Hello", { autoClose: false });
    }

    notify = () => toast("Hello", { autoClose: false });

    render() {
        return (
           <div>
             <button onClick={this.notify}>Notify</button>
           </div>
      )}
}

```

package.json (in "dependencies" section)

```
"react": "^16.2.0",
"react-toastify": "^3.2.2"

```

If I debug it, I see that my toasts are queued, \_EventManager2 never gets the \_constant.ACTION.MOUNTED event that normally emits the toasts from the queue...

```
/**
 * Wait until the ToastContainer is mounted to dispatch the toast
 * and attach isActive method
 */
_EventManager2.default.on(_constant.ACTION.MOUNTED, function (containerInstance) {
  container = containerInstance;

  toaster.isActive = function (id) {
    return container.isToastActive(id);
  };

  queue.forEach(function (item) {
    _EventManager2.default.emit(item.action, item.content, item.options);
  });
  queue = [];
});

```

..so there might be something wrong with that ToastContainer but what? I just use the sample code from the documentation.

Thank you for your help!

Answer: 
install react-toastify using command

```sh
npm i react-toastify

```

Then:

```js
import {ToastContainer,toast} from 'react-toastify'

```

and in return add

```js
<ToastContainer />

```

and after that when you do `toast('hy')`
then it will show toast
To make use of the react-toastify, Please follow below steps:-

1. Install the npm package

npm i toastify --save
2. Import the react-toastify as shown below in that given order

import 'react-toastify/dist/ReactToastify.css'; // import first

import { ToastContainer, toast } from 'react-toastify'; // then this