The library will mount a
ToastContainer for you if none is mounted.
Configure the ToastContainer when it is mounted on demand
The configure function accepts the same props as the ToastContainer. As soon as the container is rendered, the call to configure will have no effect.
Multi container support
To enable multiple container support, you have to pass
enableMultiContainer and specify a
containerId and use it in
each toast, to do so add
containerId to the toast's options object.
enableMultiContainer prop to the
<ToastContainer/ > will:
- Check each toast to verify if its
containerIdmatch the container
containerIdso it can be rendered.
- Ensure not to render any
- Render any toast if both the
<ToastContainer/ >does not include
A simple example to demonstrate multi toast container capability.
- Notify A button will show a toast on the bottom left.
- Notify B button will show a toast on the top right.